织梦cms出现Deprecated: Function ereg_replace() is deprecated in

The reason why Deprecated: Function ereg_replace() is deprecated in appears when installing DEDECMS usually appears on the lower version of the dream weaving program, such as dedecms v5.6. The following AB template net editor will share with you the solution to this situation:

There are many regular functions in DEDE that use ereg_replace, and this function has now been abolished in PHP5.3.

Deprecated: Function ereg_replace() is deprecated in solution (Note: the test is valid under the host of the linux system, and the error is still reported in the local windows):

Find config.php in the dede directory, in the second line, put

define(‘DEDEADMIN’, ereg_replace("[/\]{1,}", ‘/’, dirname(FILE) ) );

Replace with

define(‘DEDEADMIN’, preg_replace("/[/\\]{1,}/",’/’, dirname(FILE) ) );

That's it.

In this way, the Deprecated: Function ereg_replace() is deprecated in problem encountered during the installation of DEDECMS is easily solved.

Guess you like

Origin blog.csdn.net/a9490489/article/details/105030599