0

保存数据后,我需要重定向到另一个我自己的页面。为此,我复制了 create.php 和 _from.php(create_1.php 和 _from_1.php)。但是当我重定向到它时,yii 给出错误 404

//AssimentController.php
 if($this->saveed($data1,$studentid,$modelcrite,$model))
{
     Yii::app()->session['model']=$model;
     $this->actionCreate_1();
}

  public function actionCreate_1()
{
   $model=new Assiment;
   $modelcrite=new AssimentMarks;
   $this->redirect(array('create_1'),
                        array('model'=>$model,'modelcrite'=>$modelcrite,));
}

//在 accessRules() 函数中

array('allow',  // allow all users to perform 'index' and 'view' actions
                'actions'=>array('index','view','Create_1'),
                'users'=>array('*'),
            ),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
                'actions'=>array('create','update','Create_1'),
                'users'=>array($user->isTeacher())
            ), 
array('allow', // allow admin user to perform 'admin' and 'delete' actions
                'actions'=>array('admin','delete','create','Create_1'),
                'users'=>array($user->isAdmin())
            ),

谁能告诉我如何解决这个问题?

4

1 回答 1

1

线

public function actionscreate_1()

应该读

 public function actionCreate_1()
于 2013-06-08T06:48:01.830 回答