install phpexcel using composer in thinkPHP

本文详细介绍了如何在Window10.1环境下通过Composer安装PHPExcel的过程。包括Composer的下载与验证、配置thinkPHP5.0.1项目的composer.json文件以及安装PHPExcel的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

转载于:https://www.cnblogs.com/raybiolee/p/5954396.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值