Re: Re: Directory Listing
| From: | hack988 hack988 | Date: | Wed, 26 Aug 2009 13:45:11 +0000 |
| Subject: | Re: Re: Directory Listing | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297267@lists.php.net to get a copy of this message | ||
I'm write a php file for you
=========================================
define('Line_End', (PHP_OS == 'WINNT')?"\r\n":"\n");
clearstatcache();
$mylist=array();
listdir("F:\\Programming\\Web\\php",$mylist);
function listdir($dir,&$list){
if ($handle = opendir( $dir )){
while ( false !== ( $item = readdir( $handle ) ) ) {
if ( $item != "." && $item != ".." ) {
$item=str_replace(Line_End,"",$item);
if ( is_dir( $dir.DIRECTORY_SEPARATOR.$item ) ) {
listdir($dir.DIRECTORY_SEPARATOR.$item, $list);
} else {
$list[]=$dir.DIRECTORY_SEPARATOR."\t".$item."\t".date("m/d/Y",
filemtime($dir.DIRECTORY_SEPARATOR.$item));
}
}
}
closedir( $handle );
}
}
var_dump($mylist);