织梦安装后提示Function ereg_replace() is deprecated的解决方法

2017-03-27 20:23:18 dedecms
织梦 dedecms v5.6 安装后提示 Deprecated: Function ereg_replace() is deprecated in D:\www\dede\config.php on line 2 的解决办法
打开 /dede/config.php 文件
找到
define('DEDEADMIN', ereg_replace("[/\\]{1,}", 'http://www.moke8.com/', dirname(__FILE__) ) );
修改为
define('DEDEADMIN', preg_replace("/[\/\\\\]{1,}/", 'http://www.moke8.com/', dirname(__FILE__) ) );