upload image $_FILES is not set

前端 未结 7 830
星月不相逢
星月不相逢 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条回答
  • 2020-12-12 08:18

    You forgot the enctype in the form.

    <form action="" method="post" enctype="multipart/form-data">
        <label for="file">Logo</label>
        <input type="file" name="upl" />
        <input type="submit" disabled="disabled" value="" />
    </form>
    
    0 讨论(0)
提交回复
热议问题