手机
当前位置:查字典教程网 >编程开发 >php教程 >php目录拷贝实现方法
php目录拷贝实现方法
摘要:本文实例讲述了php目录拷贝实现方法。分享给大家供大家参考。具体如下:functioncopy_dir($src,$dst){$dir=op...

本文实例讲述了php目录拷贝实现方法。分享给大家供大家参考。具体如下:

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');

希望本文所述对大家的php程序设计有所帮助。

【php目录拷贝实现方法】相关文章:

php实现CSV文件导入和导出方法

php计算到指定日期还有多少天的方法

php中smarty区域循环的方法

php输出全球各个时区列表的方法

php实现图片转换成ASCII码的方法

php实现ping

php生成圆角图片的方法

php中smarty实现多模版网站的方法

php实现文本数据导入SQL SERVER

php循环table实现一行两列显示的方法

精品推荐
分类导航