How to get the current directory listing in PHP
In PHP if you want to list the files existing in the current directory, this is how you do it:
<?php
$dir=getcwd();
$dirhandle=opendir($dir);
while(false!==($thisfile=readdir($dirhandle)))
{
print $thisfile . “<br />”;
}
Posted by Amrit | Tags: Uncategorized
You can leave a response, or trackback from your own site.


