Why is the file $_FILE uploaded by phpstudy always empty (I am using phpStudy)
巴扎黑
巴扎黑 2017-05-19 10:07:31
0
1
527

<!DOCTYPE>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html;
     charset=UTF-8"
    >
    <title>this is my fileuUpload</title>
</head>
<body>
    <form action="doAction.php" method="post"
          enctype="multipart/form-data">
        请选择你要上传的文件
        <input type="file" name="myfile"/><br/>
        <input type="submit" value='上传文件'/><br/>
    </form>
</body>

</html>

<?php
/**

  • Created by PhpStorm.

  • User: Administrator

  • Date: 2017/5/18

  • Time: 19:19
    */

//$_FILES

print_r($_FILES);

巴扎黑
巴扎黑

reply all(1)
世界只因有你

I guess the size of the file you uploaded exceeds the configuration size in PHP. The default is 2M. You can try uploading a file smaller than 2M. If it is OK, try changing the configuration to a larger size. Also, the received file is $_FILES instead of $_FILE.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template