如何显示PHP错误
"调用未定义的方法stdClass::"?
我该如何配置PHP5或apache2?
谢谢。
您可以使用method_exists()
方法来获取函数是否存在。
method_exists('Directory','read');
^^^ ^^^
class_name method_name
并使用以下代码
ini_set('error_reporting', E_ALL);
在php代码的顶部获取所有错误。
在PHP.ini文件中设置error_reporting=on
或error_reporing(E_ALL);在您的页面
http://in1.php.net/manual/en/errorfunc.configuration.php#ini.error-报告