upload image $_FILES is not set

前端 未结 7 846
星月不相逢
星月不相逢 2020-12-12 07:26

I\'m trying to upload a file to my server But the problem is the if(isset($_FILES[\'upl\'])) always returns false

my php:

if($_SERVER[\'REQUEST_METHO         


        
7条回答
  •  猫巷女王i
    2020-12-12 08:07

    For file upload, you need to add attribute:

    enctype="multipart/form-data"
    

    So, your updated code should be:

提交回复
热议问题