折腾了两天 我特喵的也真是服了
安装方法 官方
进入网站根目录 然后执行如下命令
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
执行完毕后 安装其他查件 如
composer require phpoffice/phpspreadsheet
如遇到提示
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "/usr/bin/composer self-update" to get the latest version.
则是因为版本太低 执行
/usr/bin/composer self-update
升级过后再执行插件安装命令即可 需要禁用一些函数 忘了是啥了 后面遇到了再补上吧