xyn Posted March 8, 2007 Share Posted March 8, 2007 How can i list ALL files in a directory? Quote Link to comment Share on other sites More sharing options...
severndigital Posted March 8, 2007 Share Posted March 8, 2007 http://us2.php.net/function.opendir that should get you started. Quote Link to comment Share on other sites More sharing options...
tarun Posted March 8, 2007 Share Posted March 8, 2007 This: <?php $dir = "/etc/php5/"; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); } } ?> Should List The Directory Contents And A Few Peices Of Info About Each File Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.