Why would $_FILES be empty when uploading files to PHP?

前端 未结 21 2917
一向
一向 2020-11-21 22:37

I have WampServer 2 installed on my Windows 7 computer. I\'m using Apache 2.2.11 and PHP 5.2.11. When I attempt to upload any file from a form, it seems to upload, but in PH

21条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-21 23:39

    I have a same problem looking 2 hours ,is very simple to we check our server configuration first.

    Example:

    echo $upload_max_size = ini_get('upload_max_filesize');  
    echo $post_max_size=ini_get('post_max_size');   
    

    any type of file size is :20mb, but our upload_max_size is above 20mb but array is null. Answer is our post_max_size should be greater than upload_max_filesize

    post_max_size = 750M  
    upload_max_filesize = 750M
    

提交回复
热议问题