php如何移动已上传的图片 php图片 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 move_uploaded_file( $_FILES['photo']['tmp_name'] , $target_image )$target_image是图片在服务器上的地址,也就是你要移动的位置 可以直接用php调用系统命令的方式,exec( " mv -f /path/old.jpg /path/new.jpg " ); 好吧rename()但是我总觉得用系统命令方式会更快,尤其处理大文件。 当然是用 rename 函数啦 rename("cs/temporaryPicture/".$picturename[i],"cs/picture/".$picturename[i]);不行啊。总是出错啊 Warning: rename(cs/temporaryPicture/,cs/picture/) [function.rename]: No error in E:\AppServ\www\test1\sendjobpicture.php on line 14 Warning: rename(cs/temporaryPicture/,cs/picture/) [function.rename]: No error in E:\AppServ\www\test1\sendjobpicture.php on line 14 你的 $picturename[i] 是空的!cs/temporaryPicture/ 是路径,不是文件(目录)名怎么可以? 添加好友 php跨库调用 自定义function内的变量怎么在其他地方也能用? 继续提刚才正则匹配问题 我想学php有人教我吗 谁能把这个“OK”读取过来,就ok了! 切取中文和数字混合字符串中的数字 这种地址是什么意思啊?? 我想演示一下str_replace这个函数,可没成功,请指教 PHP的SOCKET php关于从数据库一个字段里面提取数据的问题 哪位看下这个循环嵌套数组有误吗?
$target_image是图片在服务器上的地址,也就是你要移动的位置
exec( " mv -f /path/old.jpg /path/new.jpg " );
rename()
但是我总觉得用系统命令方式会更快,尤其处理大文件。
rename("cs/temporaryPicture/".$picturename[i],"cs/picture/".$picturename[i]);不行啊。总是出错啊
Warning: rename(cs/temporaryPicture/,cs/picture/) [function.rename]: No error in E:\AppServ\www\test1\sendjobpicture.php on line 14
Warning: rename(cs/temporaryPicture/,cs/picture/) [function.rename]: No error in E:\AppServ\www\test1\sendjobpicture.php on line 14
怎么可以?