求移动图片并改名字的小程序 我在这个目录下面有D:/php/easyphp/www/dxsvn/data/app/images/1201/2.jpg这一张图片,我需要移动到D盘并改名字为。D:/A.jpg请问这怎么实现。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 rename('D:/php/easyphp/www/dxsvn/data/app/images/1201/2.jpg', 'D:/A.jpg');注意:需要有 D:\ 的写权限,且 D:/A.jpg 不存在 $fileName="D:/A.jpg";if(file_exitst($fileName)) unlink($fileName);$srcName="D:/php/easyphp/www/dxsvn/data/app/images/1201/2.jpg";if(file_exitst($srcName)) rename($srcName,$fileName);else die("源文件不存在!!~~~"); $fileName="D:/A.jpg";if(file_exists($fileName)) unlink($fileName);$srcName="D:/php/easyphp/www/dxsvn/data/app/images/1201/2.jpg";if(file_exists($srcName)) rename($srcName,$fileName);else die("源文件不存在!!~~~"); PHP脚本调用zip创建压缩包,如何仅添加相对目录,或者不添加目录信息 php中调用其他文件中的函数 判断图片文件结尾,补全.jpg, .jpeg, .png or .gif 请给解释一下 想了半天真想把比尔盖茨搞死,大家进来评论一下,唉............................... 这个正则没看懂 一个sql查询问题 中文排序问题 如何用正则表达式将HTML标签XHTML化 图片如何分开显示呀?高手请进 php计划任务怎么停止了,不知道什么原因 JS中直接调用PHP的优劣讨论请教
if(file_exitst($fileName))
unlink($fileName);
$srcName="D:/php/easyphp/www/dxsvn/data/app/images/1201/2.jpg";
if(file_exitst($srcName))
rename($srcName,$fileName);
else
die("源文件不存在!!~~~");
if(file_exists($fileName))
unlink($fileName);
$srcName="D:/php/easyphp/www/dxsvn/data/app/images/1201/2.jpg";
if(file_exists($srcName))
rename($srcName,$fileName);
else
die("源文件不存在!!~~~");