Re: [問題] 網頁的商品圖片無法上傳成功

看板Web_Design作者 (悲情城市之悲情程式猿)時間19年前 (2006/10/11 04:18), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《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
文章代碼(AID): #15B00OfV (Web_Design)
文章代碼(AID): #15B00OfV (Web_Design)