amfphp\core\shared\util\MethodTable.php错误解决方法!

Error retrieving service info: Function eregi_replace() is deprecated C:\wamp\www\amfphp\core\shared\util\MethodTable.php on line 506 Error retrieving service info:

Function eregi_replace() is deprecated
C:\wamp\www\amfphp\core\shared\util\MethodTable.php on line 506

是因为该方法在php5.3中被去掉了,所以会提示错误,

修改/amfphp/core/shared/util/MethodTable.php 文件:

        $comment = eregi_replace("\n[ \t]+", "\n", trim($comment));
        $comment = str_replace("\n", "\\n", trim($comment));
        $comment = eregi_replace("[\t ]+", " ", trim($comment));

改成下面的内容。就正确了

        $comment = preg_replace("#\n[ \t]+#U", "\n", trim($comment));
        $comment = str_replace("\n", "\\n", trim($comment));
        $comment = preg_replace("#[\t ]+#U", " ", trim($comment));

 

posted @ 2009-09-24 15:15  zhych  阅读(709)  评论(0编辑  收藏  举报