php5.5中ecshop提示Only variables should be passed by reference
php大家用的版本不断提高,Ecshop没有来得及修改那么及时。
Ecshop安装出现
Only variables should be passed by reference
5.3以上版本的问题,应该也和配置有关 只要418行把这一句拆成两句就没有问题了
<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy8424')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy8424>$tag_sel = array_shift(explode(' ', $tag));
改成:
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);
(实验过,绝对可行) 因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值
修改
<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy8754')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy8754>Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead...?
cls_template.php
$out = "<?php \n" . '$k = ' . preg_replace_callback("/(\'\\$[^,] )/e" , "stripslashes(trim('\\1','\''));", var_export($t, true)) . ";\n";
您可能感兴趣的文章:
php5.5中ecshop提示Only variables should be passed by reference
解决PHP5.4环境下ECSHOP网站报错的方法
Ecshop提示Only variables should be passed by reference in错误
Strict Standards: Only variables should be passed by reference in
Apache Reference Manual (12)
Golang学习小结、从入门到精通资料汇总
PHP7 的抽象语法树(AST)带来的变化
php cookie类(用到了命名空间)
Apache Reference Manual (7)
golang 状态机_Go语言的有限状态机。