【发布时间】:2013-10-09 12:19:55
【问题描述】:
我使用 Gii 创建了一个模块(education)。该模块有一个控制器(article),其中包含三个操作(index、read、write)。
我访问模块是这样的:
http://example.com/index.php/education/article/index (工作正常)
http://example.com/index.php/education/article/read(重定向到 索引操作)
http://example.com/index.php/education/article/write (重定向到 索引操作)
所以问题是我只能访问 article 控制器中的 index 操作。当我尝试访问任何其他操作时,它总是重定向到 index 操作。
我在 config/main 中有以下条目:
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'password',
'ipFilters'=>array('127.0.0.1','::1'),
),
'education'
),
知道是什么问题吗?
【问题讨论】:
-
请查看文章的访问规则
-
在文章控制器中没有实现访问规则。
-
向我们展示您的代码:读取或写入操作,以及 url 配置
标签: php url yii module url-redirection