1.添加"phpoffice/phpspreadsheet":"1.8.*"
到composer.json
2.执行composer install
1 首先出现下面的提示
Installation request for phpoffice/phpspreadsheet 1.8.2 -> satisfiable by phpoffice/phpspreadsheet[1.8.2].
1.8.*改成1.8.2即可
2 缺少扩展fileinfo
对应的提示如下
- phpoffice/phpspreadsheet 1.8.2 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/php/etc/php.ini
- /usr/local/php/etc/php.d/03-imagick.ini
- /usr/local/php/etc/php.d/05-memcached.ini
- /usr/local/php/etc/php.d/05-redis.ini
You can also run `php --