作者forgmonkey (悲情城市之悲情程式猿)
看板Web_Design
标题Re: [问题] 网页的商品图片无法上传成功
时间Wed Oct 11 04:32:07 2006
※ 引述《yessy (遗失的美好)》之铭言:
hmm... my chinese input method is borken
sorry for my bad Englines :p
This is upload function, it's seem ok,but.....
it's will copy the file from server-temp to "../uploads"
but something wrong on here!!!
may be you can check is the "../uploads" writable or not!
there might not have 权限 (<-it's by post XD)
in addition,
if this file is in "/var/www/foobar"
then check "/var/www/uploads"
if this file is in "c:\wwwroot\someweb\something/"
then check "c:\wwwroot\someweb\uploads"
see?
".."is mean the up-level
it's all!
sorry for my Englines again!
$key = $_FILES["pic"];
if(!empty($key["name"] )){
if(copy($key["tmp_name"],"../uploads/".$key["name"])){
$pic_name = $key["name"];
}
else{
$pic_name = "../uploads/nopic.gif";
}
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.121.0.151
1F:推 yessy:谢谢>///<我看得懂你的英文,我会试着你的方法处理看看, 10/11 17:41
2F:→ yessy:虽然我完全不懂这上传程式是在写什麽......呜呜。 10/11 17:42