Ecshop却没来得及修改,如果在高版本的php虚拟主机上安装ecshop程序,出现兼容性问题。
小编在本地环境php5.5上安装出现以下两种报错提示:
Only variables should be passed by reference php
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead…"htmlcode">
$tag_sel = array_shift(explode(' ', $tag));
修改为:
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);
因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值
第二个报错解决办法:
找到文件:include/cls_template.php
将以下代码:
return preg_replace("/{([^\}\{\n]*)}/e", "\$this->select('\\1');", $source);
修改成:
return preg_replace_callback("/{([^\}\{\n]*)}/", function($r) { return $this->select($r[1]); }, $source);
小编目前只遇到这样两个报错,如果在程序调试和开发过程中遇到其他的问题,如果能够解决,小编也是会整理出解决方法的。
ecshop 在高版本PHP下报错的解决方法
1 .ecshop提示Strict Standards: Non-static method cls_image
::gd_version() should not be called statically inE:/wwwroot/weirenchou/includes/lib_base.php on line 346
找到346行吧
return cls_image::gd_version()
替换成:
$p = new cls_image();return $p->gd_version();
2 .ecshop的时候出现如下错误:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /ecshop/includes/cls_template.php on line 300
打开ecshop的目录找到includes/cls_template.php 到第300行
把
return preg_replace("/{([^/}/{/n]*)}/e", "/$this->select('//1');", $source);
替换成
return preg_replace_callback("/{([^/}/{/n]*)}/", function($r) { return $this->select($r[1]); }, $source);
3. Strict Standards: Only variables should be passed by reference in E:/web/shopex/includes/cls_template.php on line 422
$tag_sel = array_shift(explode(' ', $tag));
改成:
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);
4 .会员整合出现
phpbb::set_cookie() should be compatible with integrate /includes/modules/integrates/phpbb.php on line 232 110行 function set_cookie ($username="")
修改成
function set_cookie ($username="", $remember = NULL) includes/modules/integrates/phpwind6.php
ucenter.php vbb.php也是这样修改
ucenter.php 210行修改成
function add_user($username, $password, $email, $gender = -1, $bday = 0, $reg_date = 0, $md5password = '')
127行修改成
function login($username, $password, $remember = NULL)
5. 数据库备份出现
edefining already defined constructor for class cls_sql_dump /admin/includes/cls_sql_dump.php on line function __construct(&$db, $max_size =) { $this->cls_sql_dump($db, $max_size); }
移到function cls_sql_dump(&$db, $max_size=0)前面
Non-static method cls_sql_dump::get_random_name() admin/database.php on line 64
打开includes/cls_sql_dump.php
479行
function get_random_name()
修改成
static function get_random_name()
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
- 国风大师纯音系列《古筝仙子 常静演奏 十指弹一》1CD[FLAC][919MB]
- DasKapital-OneMustHaveChaosInsidetoGiveBirthtoaDancingStar(2024)[24-44.1]WAV
- 王菲.1999-《只爱陌生人》日本东芝版[低速原抓WAV+CUE]
- 张小英1987-金奖金曲第一集[新加坡版][WAV+CUE]
- 鹿晗.2015-重启【海蝶】【FLAC分轨】
- 张芸京.2012-小女孩【金牌大风】【WAV+CUE】
- 余天.2002-雄狮魅力金曲2CD(南方金点系列)【南方】【WAV+CUE】
- 银霞.1982-《结·SAYYESMYBOY》台湾复刻版[WAV+CUE]
- 梁汉文1993-火热动感[引进版][WAV+CUE]
- 梁汉文2008-EDMONDHITS48[香港]3CD[WAV+CUE]
- 国风大师纯音系列《童丽-[渭城曲]》1CD[WAV分轨][593.5MB]
- 国风大师纯音系列《许菱子《烧筝2》古筝曲集》1CD[WAV分轨][1.3GB]
- 王子异《1996 Part.2》[320K/MP3][18.29MB]
- 群星.1994-宝丽金最倾情3CD【宝丽金】【WAV+CUE】
- 乐俊亨.2024-同泪【CharioticMusic】【FLAC分轨】