PHP directory Copy implementation method, PHP directory copy
This article describes the PHP directory copy implementation method. Share to everyone for your reference. Specific as follows:
function Copy_dir ($SRC, $dst) { $dir = Opendir ($SRC); @mkdir ($DST); while (false!== ($file = Readdir ($dir))) { if ($file! = ') && ($file! = ' ... ')) { if (Is_dir ($src. '/' . $file) { copy_dir ($src. '/' . $file, $dst. '/' . $file); Continue; } else { copy ($src. '/' . $file, $dst. '/' . $file); }}} Closedir ($dir);} Copy_dir (' E:/www/chat ', ' e:/www/chat3 ');
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/1030139.html www.bkjia.com true http://www.bkjia.com/PHPjc/1030139.html techarticle PHP Directory Copy implementation method, PHP directory Copy This example describes the PHP directory copy implementation method. Share to everyone for your reference. Specific as follows: function Copy_dir ($SRC, $dst) {$di ...