Home> PHP Framework> YII> body text

How to block error prompts in Yii

Robert De Niro
Release: 2020-07-20 11:14:01
Original
2930 people have browsed it

Yii method to block error prompts: first open the entry file "index.php"; then add "error_reporting (0);"; finally comment "defined('YII_DEBUG') or define('YII_DEBUG', true);" that's it.

How to block error prompts in Yii

yii Shield error prompt

Process in the entry file index.php:

Add Top:error_reporting (0);

Comments:defined('YII_DEBUG') or define('YII_DEBUG',true);

Recommended : "yiiTutorial"

In addition: The error handler is registered in the constructor method in the application, using the PHP functions set_exception_handler and set_error_handler. If you don't want Yii to handle errors and exceptions, you can define YII_ENABLE_ERROR_HANDLER and YII_ENABLE_EXCEPTION_HANDLER as false in the entry file.

The above is the detailed content of How to block error prompts in Yii. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!