Directory Operations
- New Catalog
mkdir (path, permissions, recursive creation)
- Delete Directory
RmDir ()
- Move (rename)
Rename ()
- Get directory Contents
Open Directory
Directory handle = Opendir ()
Read Directory
File name = Readdir (directory handle)
Reads the file name in turn, moves the handle pointer down, and returns false if it is not read
Close Directory
Closedir ()
Read Directory contents recursively
showDir('../../file');functionshowDir($path,$dep=0){$pos = opendir($path); while(false!==$file=readdir($pos)){ if($file=='.'||$file=='..') continue; echo str_repeat(" ",$dep*4),$file.'
'; if(is_dir($path.'/'.$file)){ $func = __FUNCTION__; $func($path.'/'.$file,$dep+1); } }}
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the PHP directory, including PHP, directory content, I hope that the PHP tutorial interested in a friend helpful.