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

前端 未结 21 2854
一向
一向 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:26

    Check your php.ini for enable_post_data_reading=On , because:

    Disabling this option causes $_POST and $_FILES not to be populated. The only way to read postdata will then be through the php://input stream wrapper. (... )

    In http://php.net/manual/en/ini.core.php#ini.enable-post-data-reading

提交回复
热议问题