您新来正确配置 main.php 配置并准备好控制器操作。
私人/受保护/配置/main.php
'urlManager'=>array(
//path is slash separated format aka www.url.com/controller/action/getparam/getvalue
'urlFormat'=>'path',
'showScriptName'=>false,
'caseSensitive'=>true,
'rules'=>array(
//site is your controller, comapny is your action and the name is get variable actionCompany is waiting for.
'<name>' => 'site/company'
)),
private/protected/controllers/SiteController.php(如果你使用 accessesControll 过滤器,请确保 actioname 公司在 accessRules 中)。
public function actionCompany( $name )
{
/* your action code */
$this->render('test', array( 'test' => 'to_view' ) );
}
如果这没有帮助,那么您必须向我们提供更多代码。