ecshop服务端+后台错误修改

2024-06-16 15:32

本文主要是介绍ecshop服务端+后台错误修改,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1.Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in E:\work\server\ECShop_V2.7.3_UTF8_release1106\upload\includes\cls_template.php on line 300

        解决:

               return preg_replace("/{([^\}\{\n]*)}/e", "\$this->select('\\1');", $source);

               改为: return preg_replace_callback("/{([^\}\{\n]*)}/", function($r) { return $this->select($r[1]); }, $source);

 

2.Strict Standards: Only variables should be passed by reference in includes\cls_template.php on line 422

                 解决 

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

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

 

 

3.Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in \includes\cls_template.php on line 499

                 解决:

                     $out = "<?php \n" . '$k = ' . //$out = "<?php \n" . '$k = ' . preg_replace("/(\'\\$[^,]+)/e" , "stripslashes(trim('\\1','\''));", var_export($t, true)) . ";\n";

                     改为:  $out = "<?php \n" . '$k = ' . preg_replace_callback("/(\'\\$[^,]+)/", function($r) { return stripslashes(trim($r[1],'\'')); }, var_export($t, true)) . ";\n";

 

4.Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in includes\cls_template.php on line 552

                 解决:

                            $val = preg_replace("/\[([^\[\]]*)\]/eis", "'.'.str_replace('$','\$','\\1')", $val);

                            改为:$val = preg_replace_callback("/\[([^\[\]]*)\]/is", function($r) { return '.'.str_replace('$','\$',$r[1]); }, $val);

 

5.Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in includes\cls_template.php on line 1071

                 解决:

                       $pattern='/<!--\s#BeginLibraryItem\s\"\/(.*?)\"\s-->.*?<!--\s#EndLibraryItem\s-->/se';

                       $replacement = "'{include file='.strtolower('\\1'). '}'";

                       $source = preg_replace($pattern, $replacement, $source);

                       改为:

                      $pattern='/<!--\s#BeginLibraryItem\s\"\/(.*?)\"\s-->.*?<!--\s#EndLibraryItem\s-->/s';

                      $source = preg_replace_callback($pattern, function($ro){return '{include file='.strtolower($ro[1]). '}';}, $source);

 
6.Strict Standards: Only variables should be passed by reference in includes\lib_main.php on line 1329

            解决:

                 $ext = end(explode('.', $tmp));

                 改为:$ext_arr = explode('.', $tmp);$ext = end($ext_arr);

 


7.Strict Standards: Non-static method cls_image::gd_version() should not be called statically in includes\lib_base.php on line 346

             解决:

                     return cls_image::gd_version();

                    改为:$cls_image = new cls_image(); return $cls_image->gd_version();

 

 

8.Strict Standards: Redefining already defined constructor for class captcha in includes\cls_captcha.php on line 119(网站后台验证码不显示时出现)

                解决:

                        找到下面这段代码

                       function __construct($folder = '', $width = 145, $height = 20)

                      {

                               $this->captcha($folder, $width, $height);

                      }

                    将它移到function captcha($folder = '', $width = 145, $height = 20) 的上边。

 

 

 9.Strict Standards: mktime(): You should be using the time() function instead in admin\sms_url.php on line 31

        Strict Standards: mktime(): You should be using the time() function instead inadmin\shop_config.php on line32(php版本问题

                 解决:          mktime()    修改为    time()

 


 

 

 

 

这篇关于ecshop服务端+后台错误修改的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1066827

相关文章

Go标准库常见错误分析和解决办法

《Go标准库常见错误分析和解决办法》Go语言的标准库为开发者提供了丰富且高效的工具,涵盖了从网络编程到文件操作等各个方面,然而,标准库虽好,使用不当却可能适得其反,正所谓工欲善其事,必先利其器,本文将... 目录1. 使用了错误的time.Duration2. time.After导致的内存泄漏3. jsO

Python实现无痛修改第三方库源码的方法详解

《Python实现无痛修改第三方库源码的方法详解》很多时候,我们下载的第三方库是不会有需求不满足的情况,但也有极少的情况,第三方库没有兼顾到需求,本文将介绍几个修改源码的操作,大家可以根据需求进行选择... 目录需求不符合模拟示例 1. 修改源文件2. 继承修改3. 猴子补丁4. 追踪局部变量需求不符合很

Python中ModuleNotFoundError: No module named ‘timm’的错误解决

《Python中ModuleNotFoundError:Nomodulenamed‘timm’的错误解决》本文主要介绍了Python中ModuleNotFoundError:Nomodulen... 目录一、引言二、错误原因分析三、解决办法1.安装timm模块2. 检查python环境3. 解决安装路径问题

如何解决mysql出现Incorrect string value for column ‘表项‘ at row 1错误问题

《如何解决mysql出现Incorrectstringvalueforcolumn‘表项‘atrow1错误问题》:本文主要介绍如何解决mysql出现Incorrectstringv... 目录mysql出现Incorrect string value for column ‘表项‘ at row 1错误报错

Linux修改pip和conda缓存路径的几种方法

《Linux修改pip和conda缓存路径的几种方法》在Python生态中,pip和conda是两种常见的软件包管理工具,它们在安装、更新和卸载软件包时都会使用缓存来提高效率,适当地修改它们的缓存路径... 目录一、pip 和 conda 的缓存机制1. pip 的缓存机制默认缓存路径2. conda 的缓

Linux修改pip临时目录方法的详解

《Linux修改pip临时目录方法的详解》在Linux系统中,pip在安装Python包时会使用临时目录(TMPDIR),但默认的临时目录可能会受到存储空间不足或权限问题的影响,所以本文将详细介绍如何... 目录引言一、为什么要修改 pip 的临时目录?1. 解决存储空间不足的问题2. 解决权限问题3. 提

Linux文件名修改方法大全

《Linux文件名修改方法大全》在Linux系统中,文件名修改是一个常见且重要的操作,文件名修改可以更好地管理文件和文件夹,使其更具可读性和有序性,本文将介绍三种在Linux系统下常用的文件名修改方法... 目录一、引言二、使用mv命令修改文件名三、使用rename命令修改文件名四、mv命令和rename命

mybatis-plus 实现查询表名动态修改的示例代码

《mybatis-plus实现查询表名动态修改的示例代码》通过MyBatis-Plus实现表名的动态替换,根据配置或入参选择不同的表,本文主要介绍了mybatis-plus实现查询表名动态修改的示... 目录实现数据库初始化依赖包配置读取类设置 myBATis-plus 插件测试通过 mybatis-plu

Linux下修改hostname的三种实现方式

《Linux下修改hostname的三种实现方式》:本文主要介绍Linux下修改hostname的三种实现方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux下修改ho编程stname三种方式方法1:修改配置文件方法2:hFvEWEostnamectl命

SpringBoot项目启动错误:找不到或无法加载主类的几种解决方法

《SpringBoot项目启动错误:找不到或无法加载主类的几种解决方法》本文主要介绍了SpringBoot项目启动错误:找不到或无法加载主类的几种解决方法,具有一定的参考价值,感兴趣的可以了解一下... 目录方法1:更改IDE配置方法2:在Eclipse中清理项目方法3:使用Maven命令行在开发Sprin