0

代码在这里

// 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>";

它给出了这个错误。我知道它真的不安全,我要撤消它,但我将网站的整个目录都放在公共读/写目录中,只是为了看看它是否可以工作。它仍然没有。

4

1 回答 1

2

第 6 行你有一个.介于$_FILES['uploaded'].['name']

于 2012-11-27T18:29:52.677 回答