install phpexcel using composer in thinkPHP
Environment
- Window 10.1
- XAMPP 7.0.9 (PHP 7.0.9)
- thinkPHP 5.0.1
Steps
# visit https://getcomposer.org/download/
> php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
> php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
> php composer-setup.php
> php -r "unlink('composer-setup.php');"
# make sure you are in the root dir of thinkphp
# edit the composer.json file,
# add `"PHPOffice/PHPExcel": "1.8.*"` in the "require"
# save and exit
php composer.phar require PHPOffice/PHPExcel
# or
php composer.phar require
# to search for the package you want to install
天和地是灰色的,砖和瓦也是灰色的。临街的墙几经风化,几经修补,刷过黑灰、白灰,涂过红漆,书写过不同内容的标语,又终于被覆盖;风雨再把覆盖层胡乱地揭下来,形成一片斑驳的杂色,融汇于灰色的笼罩之中。路旁的树木苍黑,瓦楞中芳草青青。
远处,炊烟缭绕。迷蒙的曙色中,矗立着...