我有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