Yii URL覆盖

Yii URL覆盖,url,yii,pathing,Url,Yii,Pathing,我已经调整了我的yiitestapp,并且能够通过在视图中创建自己的函数和页面来显示所需的内容。但是,我想链接我在菜单栏上创建的那些页面。如何覆盖url路径 例如,这行代码: array('label'=>'Manage Chemicals', 'url'=>array('%2FGetChemicals')), 生成地址 localhost/yiitestapp/index.php?r=product_try/%2FGetApparatus 但是我需要把“/”拿走 为什么要使用%

我已经调整了我的yiitestapp,并且能够通过在视图中创建自己的函数和页面来显示所需的内容。但是,我想链接我在菜单栏上创建的那些页面。如何覆盖url路径

例如,这行代码:

array('label'=>'Manage Chemicals', 'url'=>array('%2FGetChemicals')),
生成地址

localhost/yiitestapp/index.php?r=product_try/%2FGetApparatus
但是我需要把“/”拿走

为什么要使用%2F

array('label'=>'Manage Chemicals', 'url'=>array('%2FGetChemicals')),
你可以这样做

array('label'=>'Manage Chemicals', 'url'=>array('/GetChemicals')),