创建文件夹
| 代码如下 | 复制代码 |
|
function Createfolder($path,$nname){ if(preg_match("/^\w{1,255}$/i",$nname)){ }else{ } |
|
粘贴文件
function Past($currentpath,$currentfilename,$filepote){ //1:文件要被粘贴到的位置2:当前文件{夹}名3:文件{夹}所在的物理地址
$str = substr($currentfilename,-1,1);
if(substr($currentfilename,-1,1)=="|"){
www.111cn.net
$currentfilename = str_replace("|","",$currentfilename);
$filepote = str_replace("|","",$filepote);
}www.111cn.net
if(is_dir($currentpath) && is_writable($currentpath) && is_dir($filepote) && is_writable($filepote)){
www.111cn.net
//@mkdir($currentpath."/".$currentfilename);
$t=full_copy($filepote,$currentpath."/".$currentfilename)?'t':'f';//$filepote,need copy folder $current sava folder
www.111cn.net
}else if(is_file($filepote) && file_exists($filepote)){
if(file_exists($currentpath.$currentfilename)){ echo ('file exists! plase rename it!');exit;}
echo copy($filepote,$currentpath.$currentfilename)?'success':'errror';
www.111cn.net
}
if( $str =="|" && $t='t' ){
deldir($filepote);
www.111cn.net
}
}
原创文章:转载请注明www.111cn.net
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号