Answer the question
In order to leave comments, you need to log in
Why can't I access the Yii module?
Good afternoon,
Everything was fine, I went to the admin panel, threw my work on another project, made changes to the main theme and something glitched.
Here are the rules from config:
'rules'=>array(
'<action:(login|logout)>' => 'user/<action>',
'<action:(contact)>' => 'site/<action>',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>' =>'<module>/<controller>/<action>/<id>',
'<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
//Текущий контроллер
echo Yii::app()->controller->id . '<hr/>';
//Текущий экшн
echo Yii::app()->controller->action->id. '<hr/>';
//Текущий модуль
echo Yii::app()->controller->module->id. '<hr/>';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question