[請益] PHP 上傳的問題

看板PHP作者 (ㄚ笠伯)時間19年前 (2006/12/30 22:16), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
我寫了兩個程式 丟在public_html/tp下面的資料夾 tp權限是777 裡面的兩支程式也是 ===========index.php============== <html> <head> <title>檔案上傳</title> </head> <body> <form action="getfile.php" method="post" enctype="multipart/form-data"> 上傳檔案: <input type="file" name="userfile" size=16> <input type="submit" value="上傳"> <input type="hidden" name="MAX_FILE_SIZE" value="4096000000"> </form> </body> </html> ===========getfile.php============ <?php If ($userfile != "none") { echo "userfile: $userfile<br>"; echo "userfile_name: $userfile_name (Size: $userfile_size)<br>"; copy($userfile,"./upload/$userfile_name"); unlink($userfile); echo "上傳完成"; } else{ echo "沒有檔案"; } ?> ================================ 結果開啟index.php有顯示要上傳沒錯,但是無法上傳.jpg檔案, .csv .doc卻可以 不知道哪邊有寫錯誤??? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.223.181 ※ 編輯: liwei0321 來自: 140.113.223.181 (12/30 22:22)

12/31 00:42, , 1F
apache的上傳上限?? 可能檔案太大..
12/31 00:42, 1F

12/31 03:35, , 2F
有什麼錯誤訊息嗎?
12/31 03:35, 2F
文章代碼(AID): #15bdJ9BV (PHP)
文章代碼(AID): #15bdJ9BV (PHP)