使用输入类型文件proplem上传文件PHP,错误代码8 [英] upload file PHP using input type file proplem , error code 8
问题描述
hiii,
请检查下面的代码并告诉我出了什么问题。
注意:网站现在已经托管给了真实的服务器,而不是本地服务器
hiii ,
kindly check code below and tell me please what is goes wrong .
note : website already hosted now to a real server , not a local server
<?php
print_r($_FILES['uploaded']) ;
?>
<html>
<body>
<form enctype="multipart/form-data" action="./test.php" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
</form>
</body>
</html>
当我运行此代码并从我的电脑中选择任何文件时,它打印在数组
when i run this code and choose any file from my pc , it print below array
Array ( [name] => Desert.jpg [type] => [tmp_name] => [error] => 8 [size] => 0 )
当我搜索错误8时,它显示上传文件扩展名错误
那么这个错误含义是什么?如何解决这个问题
and when i search on error 8 , it shows that upload file extension error
so what is this error meaning and how can i solve this problem
推荐答案
_FILES ['uploaded' ]);
?>
< html>
< body>
< form enctype =multipart / form-dataaction =./ test.phpmethod =POST>
请选择一个文件:< input name =uploadedtype =file/>< br />
< input type =submitvalue =上传/>
< / form>
< / body>
< / html>
_FILES['uploaded']) ; ?> <html> <body> <form enctype="multipart/form-data" action="./test.php" method="POST"> Please choose a file: <input name="uploaded" type="file" /><br /> <input type="submit" value="Upload" /> </form> </body> </html>
当我运行此代码并从我的电脑中选择任何文件时,它打印在数组
when i run this code and choose any file from my pc , it print below array
Array ( [name] => Desert.jpg [type] => [tmp_name] => [error] => 8 [size] => 0 )
当我搜索错误8时,它显示上传文件扩展名错误
所以这个错误含义是什么?如何解决这个问题
and when i search on error 8 , it shows that upload file extension error
so what is this error meaning and how can i solve this problem
这篇关于使用输入类型文件proplem上传文件PHP,错误代码8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!