1.1 Deprecated: Function ereg_replace() is deprecated1.1.1 现象

运行应用出现如下错误提示:

Deprecated: Function ereg_replace() is deprecated in xxx.php on line ###.

1.1.2 原因

php在5.2版本以前ereg_replace都使用正常,在5.3以后,就要用preg_replace来代替。

1.1.3 解决

改成preg_replace()函数即可。