2013-06-19 28 views
0

有任何想法,爲什麼它說,任何人都:不推薦使用:通過指定參考的新的返回值phpExcelReader EXCEL reader.php已被棄用線261上

Deprecated: Assigning the return value of new by reference is deprecated in phpExcelReader\Excel\reader.php on line 261

$this->_ole =& new OLERead();

我我正在使用WAMP - PHP Version 5.3.13

+0

[指定新引用的返回值已棄用]的可能重複](http://stackoverflow.com/questions/1086539/assigning-the-return-value-of-new-by-reference-is-deprecated ) – hakre

回答

6

可能是一些老的PHP語法或方法,我改變了我的代碼和它的工作對我來說:

早些時候:

$this->_ole =& new OLERead();

更改爲:(刪除&符號)

$this->_ole = new OLERead();

警告和通知現在不見了!

+0

是的。點擊此處查看http://icfun.blogspot.in/2009/09/php-how-to-read-xls-file.html#Blog1_cmt-7645961569389698711 – Rikesh

0

根據意見在這裏http://code.google.com/p/php-excel-reader/issues/detail?id=82

問題是 $本 - > _ OLE = &新OLERead(); 抱歉,顯而易見,但它可以固定,例如,這個 $ t = new OLERead(); $ this - > _ole = & $ t;

我改變$this->_ole = new OLERead();

$t = new OLERead(); 
    $this->_ole =& $t; 

沒有錯誤消息和數據也進口。所以所有的作品。但不知道這種改變是否會導致其他問題。如果有人知道,請諮詢。

相關問題