Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In web/index.php you need to comment out the lines:
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
there is an init file in the root of the project, run from the console, and select the production environment, just check the configs in the environments folder
Simple solution with Yii2 basic deployment, check environment by IP in /web/index.php file
if($_SERVER['REMOTE_ADDR'] == '127.0.0.1') {
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question