Hi,
In my application layout, I have this code:
if (!defined('YII_DEBUG')) {
echo '<meta http-equiv="refresh" content="180;url='
. (isset($_SERVER["HTTPS"]) ? 'https://' : 'http://')
. $_SERVER['SERVER_NAME'] . Yii::app()->urlManager->createUrl('site/logout')
. '" />';
}
So, depending the value of YII_DEBUG, if it’s not defined in the entry script index.php, I send a meta refresh tag to logout the user after 180 seconds. Otherwise (development server), it should not be displayed.
However, this does not work. It doesn’t matter if I have YII_DEBUG commented or not in the index.php file, defined(‘YII_DEBUG’) always returns true. This is probably a PHP issue, but I would appreciate any help.
Thanks.