欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php目錄拷貝實(shí)現(xiàn)方法

 更新時(shí)間:2015年07月10日 10:36:44   作者:mckee  
這篇文章主要介紹了php目錄拷貝實(shí)現(xiàn)方法,通過一個(gè)自定義遞歸調(diào)用函數(shù)實(shí)現(xiàn)對(duì)目錄的拷貝功能,具有一定參考借鑒價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了php目錄拷貝實(shí)現(xiàn)方法。分享給大家供大家參考。具體如下:

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

希望本文所述對(duì)大家的php程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論