Re: [問題] 網頁的商品圖片無法上傳成功
※ 引述《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
推
10/11 17:41, , 1F
10/11 17:41, 1F
→
10/11 17:42, , 2F
10/11 17:42, 2F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):