


ECSHOP perfectly solves the problem of Deprecated: preg_replace() error, ecshopdeprecated_PHP tutorial
ECSHOP perfectly solves the problem of Deprecated: preg_replace() error. ecshopdeprecated
With the popularity of PHP5.5, new errors have emerged in the ECSHOP system. After PHP developed to PHP5.5, there have been many subtle changes. The official updates of ECSHOP are too slow, and they do not upgrade in time after discovering these problems, causing users to be full of errors during installation and use. After talking for a long time, what exactly is this new error? Its complete error message is as follows:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in....
Note: Not everyone’s ECSHOP will report this error. Only ECSHOP using the PHP5.5 environment will report this error.
The following ecshop development center (www.68ecshop.com) tutorial will first talk about the reasons for the error:
1), error reason:
The modifier /e used in the preg_replace() function has been deprecated in PHP5.5.x.
If your PHP version happens to be PHP5.5.X, then your ECSHOP will definitely report an error similar to the following:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in...
2), solution:
In fact, we can also tell something from the error message just now. It prompts us to use preg_replace_callback instead of preg_replace.
So the solution is as follows:
Use Notepad or other PHP editing software (such as: editplus) to open the file includes/cls_template.php and find
return preg_replace("/{([^}{n]*)}/e", "$this->select('\1');", $source);
Replacewith
return preg_replace_callback("/{([^}{n]*)}/", function($r) { return $this->select($r[1]); }, $source);
Problem solved.
3), If other files in your ECSHOP also report similar preg_replace errors, please refer to the above method to solve it. The solution ideas and solutions are the same.
The above ECSHOP perfectly solves the problem of Deprecated: preg_replace() error reporting is all the content shared by the editor. I hope it can give you a reference, and I also hope that everyone will support Bangkejia.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



ecshop is a "B2C" architecture; ecshop is a B2C independent online store system, suitable for enterprises and individuals to quickly build personalized online stores; the system is a cross-platform open source program developed based on PHP language and MYSQL database architecture.

MySQL is a commonly used relational database management system that provides a variety of functions to process and operate data. Among them, the REPLACE function is used to replace the specified part of the string. In this article, we will introduce how to use the REPLACE function for string replacement in MySQL and demonstrate its usage through code examples. First, let’s take a look at the syntax of the REPLACE function: REPLACE(str,search_str,replace_str).

How to sort ecshop articles: 1. Sort by publication time, you can control the order of articles in the list by modifying the publication time of the article; 2. Sort by clicks, you can achieve this sorting by installing the "Article Click Ranking" plug-in Function, this plug-in can count the number of clicks on articles; 3. Sort by the number of comments, you can implement this sorting function by installing the "Article Comment Ranking" plug-in, which can count the number of comments on articles; 4. Sort by relevance, This sorting function can be achieved by installing the "Search Ranking" plug-in.

What are the string search and replace techniques in Python? (Specific code example) In Python, strings are a common data type, and we often encounter string search and replace operations in daily programming. This article will introduce some common string search and replacement techniques, accompanied by specific code examples. To find a specific substring in a string, you can use the find() method or index() method of the string. The find() method returns the index of the first occurrence of the substring in the string.

Features: 1. Open source system with flexibility, customizability and high scalability; 2. Support independent secondary development; 3. Rich templates and plug-ins; 4. Strong industry adaptability; 5. Avoid being constrained by software vendors; 6. Stronger reliability and stability; 7. Mobile H5 framework upgrade, based on VUE comprehensive replacement, more flexible and open; 8. Multi-level rebate function, supporting QR codes, posters and other promotion methods, unlimited fission development of distributors ; 8. The visual interaction of the management terminal is completely renewed, the UI is simple and beautiful, and the operating experience is upgraded; 9. Supports PHP7.2, and the performance is doubled.

Ecshop Product Management Advanced: Learn how to add fields, you need specific code examples. When using Ecshop for product management, you often encounter situations where you need to add some custom fields to meet specific needs. By adding fields, more precise product management and better user experience can be achieved. This article will introduce how to add fields in Ecshop and provide specific code examples. First, we need to clarify the need to add fields. For example, we need to add a "production date" field to the product details page to

ECShop is a B2C independent online store system. It is a cross-platform open source program developed based on PHP language and MYSQL database architecture. It is suitable for enterprises and individuals to quickly build personalized online stores. The characteristics of the ecshop mall system: 1. Support independent secondary development; 2. Rich templates and plug-ins; 3. Strong industry adaptability; 4. Avoid being constrained by software vendors; 5. Stronger reliability and stability.

ecshop is a B2C model. ECShop is a B2C independent online store system, suitable for enterprises and individuals to quickly build personalized online stores. B2C refers to a model of e-commerce, and it is also a retail model that sells products and services directly to consumers; the payment method of B2C e-commerce is a combination of cash on delivery and online payment, and most companies choose logistics outsourcing for delivery. to save operating costs.
