[PHP]关于php安装composer遇到的坑之phpoffice/phpspreadsheet
作者原话PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc.翻译过来PhpSpreadsheet是
作者原话
PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc.
翻译过来
PhpSpreadsheet是一个纯PHP编写的库,提供了一组类,允许您读取和编写各种电子表格文件格式,如Excel和LibreOffice Calc。
我用的是thinkphp5.1的框架,需要安装一个处理Excel表格,但是当我使用composer命令安装的时候居然发现安装失败。
仔细一看,原来是没有开启扩展,当我去查看php.ini的配置文件的时候发现,什么???居然没有这个扩展。于是我便把php7.4的扩展复制到了php7.2的目录下,然后再打开php.ini,修改一下。
最终再执行一下安装命令,O了个K。大功告成,可以使用phpspreadsheet了。
注意1.18版本只能是php7.2以上版本支持
phpspreadsheet官方网站
如果你想在更低版本的php使用,请移步composer官方网站
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐

所有评论(0)