hawkcraw
有人解决一下吗?
- hawkcraw 回复了话题 yii超牛X的调试工具
受用了。感谢分享。。
Yii::app()->getRequest()->getCsrfToken()
这是我的EditAction,有问题吗??
public function actionEdit($id){ $user = Yii::app()->user; $users = new Users('edit'); $model=$users->findByPk($id); $roles = Role::model()->getRoleSelect(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if($user->id == $model->user_name) $this->redirect(array('update','id'=>$model->user_id)); if($user->checkAccess('userUpdate')){ if(isset($_POST['Users'])) { unset($_POST['Users']['user_name']); $model->attributes=$_POST['Users']; if($model->save()) $this->redirect(array('view','id'=>$model->user_id)); } $this->render('edit',array( 'model'=>$model, 'roles'=>$roles, )); }else{ $this->render('//site/error', array( 'message' => 'You are not authorized to perform this action.', 'code' => 403 )); } }
谁来帮个
如果是IIS,去找虚拟目录的资料
如果是apache,配置多站点资料
首先要域名解析到你的服务器地址- hawkcraw 回复了话题 25款实用网站后台模板
来看看