Hello,
I’am testing Yii framework and really enjoy it, thanks for the job .
I'am trying to use upload function in form but I can't successfully done it.
First question :
I created a model, and tried to add the parameter enctype multipart/form-data but I can't do it, I searched in documentation, but did not find anything. How can I do it?
Second question :
After that, I used the following sentence :
CHtml::activeFileField($events,'image');
Is that correct?
Third question
In my model I add :
public function rules() { return array( array('image','file'), ); }
Is that correct also?
And finally how can I save the file in the controller?
Many thanks in advance for your answer