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

前端 未结 21 3180
一向
一向 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 was struggling with the same problem and testing everything, not getting error reporting and nothing seemed to be wrong. I had error_reporting(E_ALL) But suddenly I realized that I had not checked the apache log and voilà! There was a syntax error on the script...! (a missing "}" )

    So, even though this is something evident to be checked, it can be forgotten... In my case (linux) it is at:

    /var/log/apache2/error.log
    

提交回复
热议问题