我想上传文件并在ubuntu的php中显示所有文件内容
我已将此代码编写在upload.html
中 <html>
<body>
<form method="POST" action="upload.php"
enctype="multipart/form-part">
<input type="file" name="file">
<button type="submit" name="submit">Upload</button>
</form>
</body>
</html>
and this in upload.php
<?php
if(isset($_POST['submit']))
{
$file = $_FILES['file'];
print_r($file);
}
its giving me an error
注意:未定义的索引:第5行/var/www/html/form/upload.php中的文件它不能识别“文件”。...为什么?