有谁能编写无限路径循环程序
$o_path="admin";//源目录$n_path="n_admin";//新目录class copy_path{function wm_chief_copypath($o_path,$n_path){$hand=opendir($o_path);if(!file_exists($n_path))//{$this->wm_chief_createpath($n_path);}$i=0;while($file=readdir($hand)){$i++;if($i==1||$i==2){continue;}if(!(strchr($file,"。 "))){$o_s_path=$...全部
$o_path="admin";//源目录$n_path="n_admin";//新目录class copy_path{function wm_chief_copypath($o_path,$n_path){$hand=opendir($o_path);if(!file_exists($n_path))//{$this->wm_chief_createpath($n_path);}$i=0;while($file=readdir($hand)){$i++;if($i==1||$i==2){continue;}if(!(strchr($file,"。
"))){$o_s_path=$o_path。"/"。$file;$n_s_path=$n_path。"/"。$file;$this->wm_chief_copypath($o_s_path,$n_s_path);}else{$o_file=$o_path。
"/"。$file;$n_file=$n_path。"/"。
$file;$this->wm_chief_copyfile($o_file,$n_file);}}closedir($hand);return true;}function wm_chief_copyfile($o_file,$n_file){copy($o_file,$n_file);}function wm_chief_createpath($n_path){mkdir($n_path,0777);}}$wm_chief=new copy_path();$wm_chief_ok=$wm_chief->wm_chief_copypath($o_path,$n_path);if($wm_chief_ok){echo"复制完毕";}有问题可以再短消息给我。收起