php - Yii2 class Yii/web/UrlManager causes error -
i have urlmanager in web.php
'urlmanager' => [ //'class' => 'yii/web/urlmanager', 'enableprettyurl' => true, 'showscriptname' => false, 'enablestrictparsing' => false, 'rules' => [ '<controller:\w+>/<id:\d+>' => '<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>', '<controller:\w+>/<action:\w+>' => '<controller>/<action>', ], ],
i wanna know, why if uncomment 'class' => 'yii/web/urlmanager', cause error when run website.
thank much
your class
path
url manager
is not correct. yii
work namespace , use namespace use backslash \
instead of front slash /
. code should in following format:
'class' => 'yii\web\urlmanager',
instead of
'class' => 'yii/web/urlmanager',
Comments
Post a Comment