"; while($file=$mydir->read()){ $file_array = explode(".",$file); if((is_dir("$directory/$file")) AND ($file!=".") AND ($file!="..")) { // echo "
  • $file
  • "; tree("$directory/$file","$directory/$file/"); } else { $file_num = count($file_array); if ($file_array[$file_num-1] == 'php'){ // $fp_1 = fopen($filepath.$file, "r"); // $readfile = readfile($filepath.$file); $array = file($filepath.$file); for ($i=0; $i$file"; } } // echo ""; $mydir->close(); } //start the program // echo "

    目录为粉红色

    "; tree("."); ?>