HTML/PHP File Upload

后端 未结 5 1259
隐瞒了意图╮
隐瞒了意图╮ 2020-12-19 21:46

So i want the user to only be able to upload docs or docx\'s. So first here\'s my html:

5条回答
  •  长情又很酷
    2020-12-19 21:55

    change

    $extension!=".doc" || $extension!=".doc"
    

    to

    $extension!=".doc" || $extension!=".docx"
    

    and use $_FILES['img'] instead of $_FILES['file'] because your file type is having img name property.

提交回复
热议问题