解决Deprecated: preg_replace(): The /e modifier is deprecated, use

使用php5.5运行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);

重新运行问题以解决
官方说明http://www.php.net/manual/zh/reference.pcre.pattern.modifiers.php

ecshop2.7.3 preg_replace()怎么替换成preg_replace_callback()

时间: 2024-10-25 07:28:30

解决Deprecated: preg_replace(): The /e modifier is deprecated, use的相关文章

ECSHOP如何解决DEPRECATED: PREG_REPLACE()报错

类似这样的报错: Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in D:\wyh\ecshop\includes\cls_template.php on line 300 1.错误原因:preg_replace() 函数中用到的修饰符 /e 在 PHP5.5.x 中已经被弃用了.如果你的PHP版本恰好是PHP5.5.X,那你的ECSHOP肯定就会报类似这样

ecshop安装过程中的问题:cls_image::gd_version();不支持JPEG;Deprecated: preg_replace();Strict Standards;

在安装Ecshop的时候,遇到好多好多问题: 1.Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:\X\www\ecshop\install\includes\lib_installer.php on line 31 解决:找到install/includes/lib_installer.php中的第31行   return cls_image::gd

解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:

php5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代. 解决方法1: 禁止PHP报错 d

PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法

这篇文章主要介绍了PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法,是在进行PHP数据库程序开发中常会遇到的错误,需要的朋友可以参考下 本文实例讲述了PHP提示 Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法,在PHP程序开发中常会遇到这类问题.分享给大家供大家参考,具体的解决方法如下: 将下面代码改为mysqli

解决MYSQL弃用模块错误Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future

今天使用了mysql 5.5版本,就出现了错误.错误提示如下: Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in 看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代.所以说这个应该说是提示更恰当. 现在知道这个错误是什么原因引起的,那么就很好解

解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代. 解决方法1: 禁止php报错

小胖学PHP总结5-----PHP操作SQL数据库(Deprecated: mysql_connect(): The mysql extension is deprecated and will)

第一:打开数据库 要操作SQL数据库,首先必须于MySQL服务器建立连接,连接MySQL服务器的语句: mysql_connect('hostname','username','password') 该函数的返回值用于表示这个数据库连接成功,如果连接成功,则会返回一个资源,为以后执行SQL指令做准备. <?php $link = mysql_connect("localhost:3306","root","123456") or die(&

【解决方案】Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in F:\Program Files (x86)\wamp\www\testmysql.php on line 2 <?php $link = mysql_connect('localhost','root',''); if (!$link) { d

解决 warning 显示 The linear_assignment function is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead

用以下代码做实验 import time import cv2 as cv import glob import argparse import sys import numpy as np import os.path from collections import deque from sklearn.utils.linear_assignment_ import linear_assignment ..... ..... for i in range(100): indices = lin