mime_content_type() function not defined

后端 未结 6 1886
有刺的猬
有刺的猬 2021-01-03 21:33

I am using the mime_content_type() function for file upload, it works fine on localhost however I\'m encountering the following error on my live server:

6条回答
  •  离开以前
    2021-01-03 22:23

    PHP 7

    1. Edit your php.ini file and uncomment extension=php_fileinfo.dll.

    2. Restart your HTTP server (e.g. Apache).

    3. echo mime_content_type($path_absolute.$file);//Outputs: application/pdf

提交回复
热议问题