Give the source code directly:
Copy the code The code is as follows:
$current_dir = 'E: /temp/';
$dir = opendir($current_dir);
echo "direcotry list:
";
while(false !== ($file=readdir($dir)) ){
if($file != "." && $file != ".."){
echo "- $file
";
}
}
echo "
";
closedir($dir);
If it is the same drive letter as the web, just write: $current_dir='/temp/ ';That's it.
http://www.bkjia.com/PHPjc/327776.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327776.htmlTechArticle gives the source code directly: Copy the code as follows: $current_dir = 'E:/temp/'; $dir = opendir($current_dir); echo "direcotry list:ul"; while(false !== ($file=readdir($dir))){ if($f...