PHP-Laravel-PHP Fileinfo extension must be installed/enabled to use Intervention Image.

摘要:PHP-Laravel-PHP Fileinfo extension must be installed/enabled to use Intervention Image.

在做Laravel-PHP 上傳圖片時,發生了這樣的錯誤

PHP Fileinfo extension must be installed/enabled to use Intervention Image.

上網查找到解決問題的文章。

http://stackoverflow.com/questions/23771117/requires-ext-fileinfo-how-do-i-add-that-into-my-composer-json-file

Nothing to do with your composer.json.

You need to install & enable FileInfo PHP extension, which is installed by default starting with PHP 5.3.0. Versions prior to 5.3+ may use the discontinued PECL extension.

To enable FileInfo extension, you need to edit your php.ini and change a single line.

  1. Locate the line:

    ;extension=php_fileinfo.dll
    
  2. Remove the starting comment:

    extension=php_fileinfo.dll

 

只要去修改 php.ini的設定檔,尋找到;extension=php_fileinfo.dll,將";"移除。就可以了。