Finfo_file on uploaded file to determine mime-type

后端 未结 3 1058
星月不相逢
星月不相逢 2020-12-31 03:51

Im trying to determine the mime-type of an uploaded file, i want to use fileinfo(), this is what ive been trying, it isnt working:

$uploadedfile = $_FILES[\'         


        
3条回答
  •  隐瞒了意图╮
    2020-12-31 04:18

    I know this is a bit old, but since you're using the $_FILES super global, can you use the type key of the file array (i.e. $_FILES['soup']['type']) rather than having the server check once the file is uploaded?

提交回复
热议问题