在当前控制器定义一个actions的方法
public function actions()
{
return array(
//
'captcha'=>array(
'class'=>'CCaptchaAction',
'backColor'=>0xFFFFFF,
),
//
//
'page'=>array(
'class'=>'CViewAction',
),
);
}
function actions(){
return array(
'captcha'=>array(
'class'=>'system.web.widgets.captcha.CCaptchaAction',
'width'=>75,
'height'=>30,
),
//我们在外边随便定义一个类,都可以通过这种方式访问
// user/co 就会访问Computer.php里边的run()方法
'co'=>array(
'class'=>'application.controllers.Computer',
),
);
}