yii屏蔽错误提示的方法:首先打开入口文件“index.php”;然后加上“error_reporting (0);”;最后注释“defined('yii_debug') or define('yii_debug',true);”即可。
yii 屏蔽错误提示
在入口文件index.php里处理:
加上: error_reporting (0);
注释: defined('yii_debug') or define('yii_debug',true);
推荐:《yii教程》
另外: 错误处理器的注册是在应用中的constructor方法中进行的,使用了php函数set_exception_handler 和set_error_handler。 如果你不想让yii来处理错误和异常,你可以在入口文件中定义yii_enable_error_handler和yii_enable_exception_handler为false.
以上就是yii如何屏蔽错误提示的详细内容。