PHP显示Deprecated: Assigning the return value of new by refere

用Spreadsheet_Excel_Reader导入EXCEL内容到数据库的时候,出现了以下提示: Deprecated: Assigning the return value of new by reference is deprecated in 定位到出错的那一行: $this-_ole = new OLERead(); 我本地环境用的是PHP/5.3.3。 解决办法:php5
用Spreadsheet_Excel_Reader导入EXCEL内容到数据库的时候,出现了以下提示:
 
Deprecated: Assigning the return value of new by reference is deprecated in
 
定位到出错的那一行:
 
$this->_ole =& new OLERead();
我本地环境用的是PHP/5.3.3。
 
 
 
解决办法:php5.3开始后,废除了php中的”=&”符号,所以要想复制,直接用=引用即可。详细如下:
 
1、PHP5对象复制是采用引用的方式;
2、如果不采用引用方式,则需要在复制对象时加关键字 clone;
3、如果在复制的过程中,同时要变更某些属性,则增加函数_clone();
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

demo展示1: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdhtml xmlns=http://www.w3.org/1999/xhtml head meta http-equiv=Content-Type content=text/html; charset=utf-8 / tit
js代码部分: $(.aFileBtn).on(change,input[type=file],function(){ var filePath=$(this).val(); //filePath.indexOf(jpg)!=-1 || filePath.indexOf(png)!=-1 if(filePath.length 0){ $(.fileerrorTip).html().hide(); var arr=filePath.split(\\); var fi
网上的很多模拟登录程序,大都是通过服务程序apache之类的运行,获取到验证码之后显示在网页上,然后填上再POST出去,这样虽然看起来很友好,但是既然模拟登录,登录后所干的事情就不一定是短时间完成的,所以这就要受到php最大执行时间的限制,而且有些操作
snoopy是一个php类,用来模仿web浏览器的功能,它能完成获取网页内容和发送表单的任务。 官方网站 http://snoopy.sourceforge.net/ 下面是它的一些特征: 方便抓取网页的内容 方便抓取网页的文字(去掉HTML代码) 方便抓取网页的链接 支持代理主机 支持基本
public class Cookie1 extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(text/html;charset=utf-8); PrintWriter out = response.getW