-
- /**
- * Traverse the directory and store the results in an array. Supports php4 and above. After php5, the scandir() function can be used to replace the while loop.
- * @param string $dir
- * @return array
- */
- my_scandir($dir)
- {
- $files = array();
- if ( $handle = opendir($dir) )
- {
- while ( ($file = readdir($handle)) !== false )
- {
- if ( $file != ".." && $file != "." )
- {
- if ( is_dir($dir . "/" . $file) )
- {
- $files[$file] = rec_scandir($dir . "/" . $file);
- }
- else
- {
- $files[] = $file;
- }
- }
- }
- closedir($handle );
- return $files;
- }
- }
-
Copy code
Briefly describe the implementation principle of unlimited classification in the forum.
Design a web page so that when it is opened, a full-screen window pops up with a text box and a button. After the user enters information in the text box and clicks the button, the window can be closed, while the entered information is displayed on the main web page.
|