[乐意黎原创]PHP7抛Fatal error: Uncaught Error: Call to undefined function ereg_replace()的解决

乐意黎在把 PHP5的程序移植到PHP7环境里时,产生如下错误:


Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /usr/XXX/public.php:98 Stack trace: #0 /usr/XXX/index.php(269): remove_symbol('\xE7\x9F\xAD\xE8\xA7\x86\xE9\xA2\x91 - \xE6\xB3\xB8...') #1 {main} thrown in /usr/XXX/public.php on line 98

[乐意黎原创]PHP7抛Fatal error: Uncaught Error: Call to undefined function ereg_replace()的解决_第1张图片


解决办法: 把 preg_replace() 替换成 str_replace() 函数.


再次测试, 大功造成.


乐意黎

2017-06-02


原文地址: http://blog.csdn.net/aerchi/article/details/72841077

你可能感兴趣的:(服务器及编程语言配置)