[英]PHPExcel files doesn't load
i need to read from excel file using php, the problem is these two lines: 我需要使用php从excel文件中读取,问题是这两行:
require 'Classes/PHPExcel.php';
require_once 'Classes/PHPExcel/IOFactory.php';
//Rest of code
Once I add these lines my code blocks , i'm sure the path is ok , i tried './Classes/PHPExcel etc..'
doesn't work 一旦我将这些行添加到我的代码块中,就可以确定路径是正确的,我尝试了'./Classes/PHPExcel etc..'
不起作用
When i execute it, it doesn't display anything , i often do echo 'smth', to see where it stops , but here only when i add these lines it stops, I use PHP 4.3 and PHPExcel 1.8 当我执行它时,它什么都不显示,我经常回显'smth',看它在哪里停止,但是在这里,只有当我添加这些行时,我才使用PHP 4.3和PHPExcel 1.8
Can you guess where the error comes from ? 您能猜出错误的来源吗?
If they're not loading, your file paths are incorrect. 如果未加载,则文件路径不正确。 Simple as that. 就那么简单。
default installation (if you followed the instructions) 默认安装(如果您按照说明进行操作)
require 'phpexcel/Classes/PHPExcel.php';
require_once 'phpexcel/Classes/PHPExcel/IOFactory.php';
Add debug code You can add echo statements in the PHPExcel libraries to see if they are really loading... if they're not... consult step 1. 添加调试代码您可以在PHPExcel库中添加echo语句,以查看它们是否确实在加载...如果不是,请查阅步骤1。
Try using an earlier version of PHP To test you can easily download XAMPP or WAMP to setup a local web host and test it out. 尝试使用早期版本的PHP要进行测试,您可以轻松下载XAMPP或WAMP来设置本地Web主机并进行测试。
I resolved the problem by using PHP EXCEL Reader because i use php 4 wich wont work with this library or with .xlsx files. 我通过使用PHP EXCEL Reader解决了该问题,因为我使用php 4来处理该库或.xlsx文件。 now it is done , and my sheet was read , still , only one sheet is read. 现在完成了,我的工作表也被读取了,仍然只读取了一张工作表。 Thank you All ! 谢谢你们 !
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.