看板 PHP 關於我們 聯絡資訊
我寫了兩個程式 丟在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)
easyman:apache的上傳上限?? 可能檔案太大.. 12/31 00:42
hanhong:有什麼錯誤訊息嗎? 12/31 03:35