页次: 1
<?php $dirname = dirname(__FILE__); function printdir($dirname) { echo "dir ### $dirname <br/>"; $handle = opendir($dirname); if (!$handle) { return; } while (FALSE !== ($file = readdir($handle))) { if ($file === '.' || $file === '..') { continue; } if (is_dir($file)) { printdir($file); } else { echo "file -- $file </br>"; } } } printdir($dirname);
ipbbs.net
离线
页次: 1