gpt4 book ai didi

php上传错误,未定义索引用户文件

转载 作者:太空宇宙 更新时间:2023-11-04 13:51:17 24 4
gpt4 key购买 nike

<分区>

<form enctype="multipart/form-data" method="post" action="upload2.php">
Send this file: <input name="userfile" type="file" /><br />
<input type="submit" value="Send File" />
</form>
<?php
if (move_uploaded_file($_FILES['userfile']['tmp_name'], "C:\wamp64\www\project")) {
print "Received {$_FILES['userfile']['name']} - its size is {$_FILES['userfile']['size']}";
} else {
print "Upload failed!";
}
?>

我在用 PHP 上传文件时遇到问题。我一直在尝试制作用于上传文件的表单。每次我都会收到以下错误。

error: "Undefined index: userfile in C:\wamp64\www\project\firstfile.php " .Any solutions ?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com