& Nbsp; copy the folder to another place. * System folder eg: copy wordpress under D: wwwroot to D: wwwrootwwwexplorer1_del1 without adding a slash. if the source folder name is not added to the copy address, the following wordpress files are copied to D: wwwrootwwwexplorerw.del copies the folder to another place.
* System folder eg: copy wordpress under D:/wwwroot/to D:/wwwroot/www/explorer/0000/del/1/Without a slash, copy address if the source folder name is not added, the following wordpress files will be copied to D:/wwwroot/www/explorer/0000/del/1/* $ from = 'd: /wwwroot/wordpress '; * $ to = 'd:/wwwroot/www/explorer/0000/del/1/wordpress ';*/
You can directly use rename to Cut files and folders. The fastest and best way.
Eg:
For folders:
Set D:/wwwroot/wordpress
Cut to D:/wwwroot/www/explorer/0000/del/1/wordpress
Zhi 'Ji rename ($ path_copy, $ path_past. $ filename .'/');
For files
Set D:/wwwroot/wordpress/test. php
Cut to D:/wwwroot/www/explorer/0000/del/1/wordpress/, that is
Rename ($ path_copy, $ path_past. $ filename );
/*** Copy the wordpress under the D:/wwwroot/folder to the D:/wwwroot/www/explorer/0000/del/1/folder without a slash, copy address if the source folder name is not added, the following wordpress files will be copied to D:/wwwroot/www/explorer/0000/del/1/* $ from = 'd: /wwwroot/wordpress '; * $ to = 'd:/wwwroot/www/explorer/0000/del/1/wordpress'; */function copy_dir ($ source, $ dest) {$ result = false; if (is_file ($ source) {if ($ dest [strlen ($ dest)-1] = '/') {$ __dest = $ dest. "/". basename ($ source);} el Se {$ __dest = $ dest;} $ result = @ copy ($ source, $ __dest); // echo iconv ($ config ['app _ charset'], $ config ['system _ charset'], $ source); @ chmod ($ __dest, 0755);} elseif (is_dir ($ source )) {if ($ dest [strlen ($ dest)-1] = '/') {$ dest = $ dest. basename ($ source); @ mkdir ($ dest); @ chmod ($ dest, 0755);} else {@ mkdir ($ dest, 0755); @ chmod ($ dest, 0755);} $ dirHandle = opendir ($ source); while ($ file = readdir ($ dirHandle) {I F ($ file! = "." & $ File! = "..") {If (! Is_dir ($ source. "/". $ file) {$ __dest = $ dest. "/". $ file;} else {$ __dest = $ dest. "/". $ file;} $ result = copy_dir ($ source. "/". $ file, $ __dest) ;}} closedir ($ dirHandle);} else {$ result = false;} return $ result ;}