[Yii Framework] yii的controller中外挂action

创建

class UpdateAction extends CAction
{
  
public function run()
  {
  
// place the action logic here 
  }
}

 

 

调用

class PostController extends CController
{
  
public function actions()
  {
  
  return array( ’edit’=>’application.controllers.post.UpdateAction’, );
  }
}

 

posted @ 2010-04-21 11:52  DavidHHuan  阅读(836)  评论(10编辑  收藏  举报