我有Yii的一个问题: 我有一个名为Slider.php模型和一个叫做SliderController.php控制器。 我写了这个代码,以使用户上传图片: public function actionCreate()
{
$model=new Slider;
// Uncomment the following line if AJAX validation is need
有两种模型,User和UserProfile。保存新用户时,使用单一表格将数据保存到模型/表格中。这里是控制器的操作。 public function actionCreate($role)
{
$User = new User;
$UserProfile = new UserProfile;
Yii::app()->params['u_role'] = $role