ecshop Deprecated: Assigning the return value of new by reference is deprecated in 报错解决方法

2014-4-14 晦涩sunshine PHP学习笔记

    今天本地测试ecshop,后台操作站点地图是报如下错误:


Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\ecshop\admin\sitemap.php on line 46

Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\ecshop\admin\sitemap.php on line 47

Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\ecshop\admin\sitemap.php on line 68

Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\ecshop\admin\sitemap.php on line 79

Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\ecshop\admin\sitemap.php on line 90

Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\ecshop\admin\sitemap.php on line 102
     于是百度了一下,发现好多童鞋出现这个问题,原来是PHP 5.3 中直接可以使用“=”,已经弃用了“=&”。再定位错误行发现,每一行都有"=&",于是将所有的“=&”都替换成“=”,问题得到解决。


    $sm     =& new google_sitemap();
    $smi    =& new google_sitemap_item($domain, $today, $_POST['homepage_changefreq'], $_POST['homepage_priority']);

标签: php ecshop php5.3

发表评论:

Powered by emlog sitemap