Using CHtml class we are creating fileField in yii framework. This post will help you to understand about how to upload file in different method, how to get and save the uploaded file in controller, file validation in model yii framework.SyntaxactiveFileField With CHtmlfileField With FormfileField With CHtml (Without Model Name)File In ControllerDONT FORGET multipart/form-data <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'files-form', 'htmlOptions'=>array('enctype' => 'multipart/form-data'), )); ?> Syntax public static string activeFileField(CModel $model, string […]... Read More »