PHP-ExcelReader错误修改办法

陈刚洁
2023-12-01
首先,下载地址:http://sourceforge.net/projects/phpexcelreader/

下载之后,运行里面的example.php会出现如下错误:

错误一:Deprecated: Assigning the return value of new by reference is deprecated inD:\wamp\www\phpExcelReader\Excel\reader.php on line 262
这个是php5.3以后版本的问题,php5.3以下版本不会出现
$this->_ole =& new OLERead();

php5.3开始后,废除了php中的”=&”符号,所以要想复制,直接用=引用即可

错误二:Warning: require_once(Spreadsheet/Excel/Reader/OLERead.php) [function.require-once]: failed to open stream: No such file or directory in D:\wamp\www\phpExcelReader\Excel\reader.php on line 31

修改办法:
将require_once 'Spreadsheet/Excel/Reader/OLERead.php';
改为:require_once 'oleread.inc';


 类似资料: