的代碼是here服務器錯誤:爲什麼我的上傳腳本不能工作?它給當它運行
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.
$uploaddir = '/var/www/upload/';
$uploadfile = $uploaddir . basename($_FILES['uploaded'].['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['uploaded']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo 'Here is some more debugging info:<br>';
print_r($_FILES);
echo "<br>";
print_r($uploadfile);
print "</pre>";
它給this錯誤。 我知道它使它真的不安全,我將撤銷它,但我做了整個目錄,該網站是在公共讀/寫目錄,只是爲了看看它是否會工作。它仍然沒有。
你應該檢查你的web服務器的錯誤日誌*真正* PHP錯誤。 – Amber
不要使用Internet Explorer來測試網站,或者至少禁用「顯示友好的HTTP錯誤消息」設置。 –