note 83006 added to function.glob

From: Date: Tue, 06 May 2008 16:07:00 +0000
Subject: note 83006 added to function.glob
Groups: php.notes 
Request: Send a blank email to php-notes+get-139095@lists.php.net to get a copy of this message
This is a function to get all files in the given dir and sub-dirs: <?php function get_data ($from) { $output = Array (); foreach (glob ($from) as $name) { if (is_dir ($name)) { get_data ($name . "/*"); } else { $output[] = $name; } } } print_r (get_data ("*")); // Will display all files and the files in the submaps from the current location. ?> ---- Server IP: 89.248.170.61 Probable Submitter: 80.61.229.220 ---- Manual Page -- http://www.php.net/manual/en/function.glob.php Edit -- https://master.php.net/note/edit/83006 Del: integrated -- https://master.php.net/note/delete/83006/integrated Del: useless -- https://master.php.net/note/delete/83006/useless Del: bad code -- https://master.php.net/note/delete/83006/bad+code Del: spam -- https://master.php.net/note/delete/83006/spam Del: non-english -- https://master.php.net/note/delete/83006/non-english Del: in docs -- https://master.php.net/note/delete/83006/in+docs Del: other reasons-- https://master.php.net/note/delete/83006 Reject -- https://master.php.net/note/reject/83006 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139095) next »