[Php] Deprecated: Function ereg_replace() is deprecated
2015-04-08 14:53
471 查看
From: http://www.zxyf.net/n6805c18.shtml
这个问题是因为你用的php版本过高。
在php5.3中,正则函数ereg_replace已经废弃,而dedecms还继续用。有两个方案可以解决以上问题:
1、把php版本换到v5.3下。
2、继续使用v5.3,修改php.ini文件
;extension=php_mbstring.dll
改为
extension=php_mbstring.dll
;mbstring.func_overload = 0
修改为:
mbstring.func_overload = 7
或者使用其他的函数:
define('DEDEADMIN', ereg_replace("[/\\]{1,}", '/', dirname(__FILE__) ) );
//改为
define('DEDEADMIN', preg_replace("/[\/\\\\]{1,}/", '/', dirname(__FILE__) ) );
注:因为preg_replace比ereg_replace的执行速度快,PHP推荐使用preg_replace.
这个问题是因为你用的php版本过高。
在php5.3中,正则函数ereg_replace已经废弃,而dedecms还继续用。有两个方案可以解决以上问题:
1、把php版本换到v5.3下。
2、继续使用v5.3,修改php.ini文件
;extension=php_mbstring.dll
改为
extension=php_mbstring.dll
;mbstring.func_overload = 0
修改为:
mbstring.func_overload = 7
或者使用其他的函数:
define('DEDEADMIN', ereg_replace("[/\\]{1,}", '/', dirname(__FILE__) ) );
//改为
define('DEDEADMIN', preg_replace("/[\/\\\\]{1,}/", '/', dirname(__FILE__) ) );
注:因为preg_replace比ereg_replace的执行速度快,PHP推荐使用preg_replace.
相关文章推荐
- Deprecated: Function ereg_replace() is deprecated in G:\wamp\www\56\dede\config.php on line 2
- Deprecated: Function ereg_replace() is deprecated
- Deprecated: Function ereg_replace() is deprecated in x:\rootwww\dede\config.php on line
- 【转】Deprecated: Function ereg_replace() is deprecated的解决方法
- Deprecated: Function ereg_replace() is deprecated
- PHP问题 —— Deprecated: Function ereg_replace() is de
- Deprecated: Function ereg_replace() is deprecated
- Deprecated: Function ereg_replace() is deprecated
- dede5.6进入后台提示PHP Deprecated: Function ereg_replace() is deprecated in dede\\config.php on line 2
- Deprecated: Function ereg_replace() is deprecated的解决方法
- This function ereg_replace() has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged
- PHP问题 —— Deprecated: Function ereg_replace() is de
- 关于php报错:Deprecated: Function ereg_replace() 的解决方法
- DEDE-Function ereg_replace() is deprecated in ..line 2
- PHP:Deprecated: Function set_magic_quotes_runtime() is deprecated 错误
- 【php】Deprecated: Function ereg() is deprecated in
- Deprecated: Function ereg_replace() is deprecated in ……【解决方法】
- DEDECMS Deprecated: Function ereg_replace() is deprecated错误提示解决方法
- PHP报错Deprecated: Function ereg_replace() is deprecated in
- 安装DEDECMS出现Deprecated: Function ereg_replace() is deprecated in 的原因