php5.4不支持 ereg、ereg_replace等函数问题

#1 zhgzzy

PHP Deprecated: Function ereg() is deprecated in F:\wxapp\SpeedPHP\Misc\notice.php on line 51 PHP Deprecated: Function ereg_replace() is deprecated in F:\wxapp\SpeedPHP\Misc\notice.php on line 54

2014-08-12 10:41:45

#2 zhgzzy

找到问题了,php与mysql版本太高,要改2个地方
1 .  notice.php  这个要改一下,这个论坛上已有
function highlight_code($code){
    if (preg_match("/<\?(php)?[^[:graph:]]/", $code)) {
        $code = highlight_string($code, TRUE);
    } else {
        $code = preg_replace("/(<\?php )+/", "", highlight_string("    }
return $code;
}
2. mysql 数据库也要改下:
打开my.ini,查找
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
修改为
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

然后重启MYSQL

2014-08-12 10:59:39