【发布时间】:2015-08-17 17:34:42
【问题描述】:
我创建了一个名为 CustomerOnBoarding 的模块。如果我调用像
这样的 urllocalhost/application_name/index.php?r=CustomerOnBoarding
它正在调用它的默认控制器和视图。另一方面,如果我创建自己的控制器及其视图并通过
调用它localhost/yii_learn/index.php/CustomerOnBoarding/Test/
然后它不工作并抛出像
这样的错误无法解析请求“CustomerOnBoarding/Test/index”
我还在配置的 main.php 文件中更改了 urlmanager 喜欢:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array('CustomerOnBoarding/Test/'=>'CustomerOnBoarding/Test/index'),
),
【问题讨论】: