To read the code of all files in the directory, you can copy the code regardless of the file name
The code is as follows:
$dir = "file";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir( $dir)) {
while (($file = readdir($dh)) !== false) {
if ($file!="." && $file!=".." ) {
echo "
".$file."";
} }
} }
closedir($dh);
}
}
?>
http://www.bkjia.com/PHPjc/318545.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318545.htmlTechArticleRead the code of all files in the directory. You can copy the code regardless of the file name. The code is as follows: ?php $dir=" file"; //Openaknowndirectory,andproceedtoreaditscontents if(is_dir($dir)){ if($dh=op...