PHP如何复制文件夹下的某些目录
function copy_module_file($path,$newp){<br /> if(!is_dir($newp)){<br /> mkdir($newp);<br /> }<br /> if (file_exists($path)){<br /> if(is_file($path)){<br /> copy($path,$newp);<br /> } else{<br /> $handle = opendir($path);<br /> while (($file = readdir($handle))!='') {<br /> if (($file!=".") && ($file!="..") && ($file!="")){<br /> if (is_dir("$path/$file")){<br /> copy_module_file("$path/$file","$newp/$file");<br /> } else{<br /> copy("$path/$file","$newp/$file");<br /> }<br /> }<br /> }<br /> closedir($handle);<br /> }<br /> }<br />}
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号