php5.5中ecshop提示Only variables should be passed by reference

php大家用的版本不断提高,Ecshop没有来得及修改那么及时。

Ecshop安装出现

Only variables should be passed by reference

5.3以上版本的问题,应该也和配置有关 只要418行把这一句拆成两句就没有问题了

 代码如下 复制代码

 $tag_sel = array_shift(explode(' ', $tag));

改成:

 $tag_arr = explode(' ', $tag);  $tag_sel = array_shift($tag_arr);

(实验过,绝对可行) 因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值

修改

 代码如下 复制代码

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";

时间: 2024-08-03 05:52:26

php5.5中ecshop提示Only variables should be passed by reference的相关文章

Ecshop提示Only variables should be passed by reference in错误

Ecshop是个坑爹货,为什么tiandi会说它是个坑爹货呢,请看一下下面的官方的运行环境推荐: 服务器端运行环境推荐 ·php版本5.0以上5.3以下的版本(推荐使用5.2系列版本) ·Mysql版本5.0及以上 ·空间安装zend ·空间支持文件锁功能 ·开启GD功能 ·Mysql函数支持mbstring.iconv.fsockopen 看见了吧,PHP5.3以下的版本,还推荐使用5.2的,尼妹的,现在哪个虚拟机还敢用5.3以下的版本?还在用5.3以下的版本?看看tiandi用的2两个主机,

ecshop提示Strict Standards: Only variables should be passed by reference in错误

ecshop提示Strict Standards: Only variables should be passed by reference in E:/Tools/ECShop_V2.7.3_UTF8_release1106/upload/includes/cls_template.php on line 418 这个错误,搜索问题原来是php版本的问题,我是用的php5.4版本的,解决办法如下:    只要418行把这一句拆成两句就没有问题了   代码如下 复制代码 $tag_sel = a

解决ECShop出现Strict Standards: Only variables should be passed by reference in问题

今天开始研究ECShop,在安装完成的时候发现首页顶部.左侧和底部出现: Strict Standards: Only variables should be passed by reference in F:\wamp\www\ecshop\upload\includes\cls_template.php on line 418 的报错信息. 第一种解决方法是杀到cls_template.php文件中发现下面这段代码: $tag_sel = array_shift(explode(' ', $

ECshop Strict Standards: Only variables should be passed by reference in解决办法

错误提示 Strict Standards: Only variables should be passed by reference in D:/wamp/ecshop/includes/cls_template.php on line 406 用软件打开406行是这句话$tag_sel = array_shift(explode(' ', $tag)); 解决方法 5.3以上版本的问题,应该也和配置有关 只要406行把这一句拆成两句就没有问题了  代码如下 复制代码 $tag_sel = a

Strict Standards: Only variables should be passed by reference in

php中使用内置的reset函数可以获取array的第一个元素的值.例如:  代码如下 复制代码 $arr = array('one', 'two', 'three'); echo reset($arr);   // 输出的结果为 one对于下述代码,如果php开启了"Strict Standards",将会看到"Strict Standards: Only variables should be passed by reference in"的提示.  代码如下

ubuntu中laravel提示缺少mcrypt扩展解决办法

mcrypt是一个加密的扩展了,在php中如果要使用此加密就必须安装mcrypt扩展了,下面我们来看看在ubuntu中laravel提示缺少mcrypt扩展解决办法,希望下文对你有帮助. 解决办法. sudo apt-get install php5-mcrypt sudo mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available sudo php5enmod mcrypt service apache2 restart 上面的方法不知

session在php5.3中的变化 session_is_registered() is deprecated in_php技巧

在php5.3中运行书中代码会有如下提示:Function session_is_registered() is deprecated inFunction session_register() is deprecated in 意思是说这两个函数是不赞成的,弃用的. 下面是php官方手册上的代码,注释部分已经说明了不赞成用session_register() 复制代码 代码如下: <?php// Use of session_register() is deprecated 不赞成用sessi

ecshop提示Strict Standards: Non-static method cls_image::gd_version()

在使用ecshop时提示 ecshop提示Strict Standards: Non-static method cls_image::gd_version() should not be called statically in E:/wwwroot/weirenchou/includes/lib_base.php on line 346 这个错误,搜索问题原来是php版本的问题,我是用的php5.4版本的,解决办法如下: 找到346行吧 return cls_image::gd_versio

电脑中出现提示需要设置注册表项HKLM\Software怎么解决

  电脑中出现提示需要设置注册表项HKLMSoftware怎么解决          1.按Win+R打开运行,输入regedit并回车; 2.在注册表中依次展开HKEY_LOCAL_MACHINESOFTWAREMicrosoft.NETFramework; 3.在右侧找到InstallRoot,并双击打开,将其值修改为.NET Framework的安装路径,比如为C:WINDOWSMicrosoft.NETFramework; 4.如果没有找到InstallRoot,则在该目录下新建一个字符