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

相关文章

SpringBoot+Docker+Graylog 如何让错误自动报警

《SpringBoot+Docker+Graylog如何让错误自动报警》SpringBoot默认使用SLF4J与Logback,支持多日志级别和配置方式,可输出到控制台、文件及远程服务器,集成ELK... 目录01 Spring Boot 默认日志框架解析02 Spring Boot 日志级别详解03 Sp

SQL Server修改数据库名及物理数据文件名操作步骤

《SQLServer修改数据库名及物理数据文件名操作步骤》在SQLServer中重命名数据库是一个常见的操作,但需要确保用户具有足够的权限来执行此操作,:本文主要介绍SQLServer修改数据... 目录一、背景介绍二、操作步骤2.1 设置为单用户模式(断开连接)2.2 修改数据库名称2.3 查找逻辑文件名

SpringBoot排查和解决JSON解析错误(400 Bad Request)的方法

《SpringBoot排查和解决JSON解析错误(400BadRequest)的方法》在开发SpringBootRESTfulAPI时,客户端与服务端的数据交互通常使用JSON格式,然而,JSON... 目录问题背景1. 问题描述2. 错误分析解决方案1. 手动重新输入jsON2. 使用工具清理JSON3.

Oracle修改端口号之后无法启动的解决方案

《Oracle修改端口号之后无法启动的解决方案》Oracle数据库更改端口后出现监听器无法启动的问题确实较为常见,但并非必然发生,这一问题通常源于​​配置错误或环境冲突​​,而非端口修改本身,以下是系... 目录一、问题根源分析​​​二、保姆级解决方案​​​​步骤1:修正监听器配置文件 (listener.

Linux中修改Apache HTTP Server(httpd)默认端口的完整指南

《Linux中修改ApacheHTTPServer(httpd)默认端口的完整指南》ApacheHTTPServer(简称httpd)是Linux系统中最常用的Web服务器之一,本文将详细介绍如何... 目录一、修改 httpd 默认端口的步骤1. 查找 httpd 配置文件路径2. 编辑配置文件3. 保存

Python FastMCP构建MCP服务端与客户端的详细步骤

《PythonFastMCP构建MCP服务端与客户端的详细步骤》MCP(Multi-ClientProtocol)是一种用于构建可扩展服务的通信协议框架,本文将使用FastMCP搭建一个支持St... 目录简介环境准备服务端实现(server.py)客户端实现(client.py)运行效果扩展方向常见问题结

如何解决Druid线程池Cause:java.sql.SQLRecoverableException:IO错误:Socket read timed out的问题

《如何解决Druid线程池Cause:java.sql.SQLRecoverableException:IO错误:Socketreadtimedout的问题》:本文主要介绍解决Druid线程... 目录异常信息触发场景找到版本发布更新的说明从版本更新信息可以看到该默认逻辑已经去除总结异常信息触发场景复

Python struct.unpack() 用法及常见错误详解

《Pythonstruct.unpack()用法及常见错误详解》struct.unpack()是Python中用于将二进制数据(字节序列)解析为Python数据类型的函数,通常与struct.pa... 目录一、函数语法二、格式字符串详解三、使用示例示例 1:解析整数和浮点数示例 2:解析字符串示例 3:解

CentOS 7 YUM源配置错误的解决方法

《CentOS7YUM源配置错误的解决方法》在使用虚拟机安装CentOS7系统时,我们可能会遇到YUM源配置错误的问题,导致无法正常下载软件包,为了解决这个问题,我们可以替换YUM源... 目录一、备份原有的 YUM 源配置文件二、选择并配置新的 YUM 源三、清理旧的缓存并重建新的缓存四、验证 YUM 源

python3 pip终端出现错误解决的方法详解

《python3pip终端出现错误解决的方法详解》这篇文章主要为大家详细介绍了python3pip如果在终端出现错误该如何解决,文中的示例方法讲解详细,感兴趣的小伙伴可以跟随小编一起了解一下... 目录前言一、查看是否已安装pip二、查看是否添加至环境变量1.查看环境变量是http://www.cppcns