Before save the image into database, i created one ‘text’ field in mysql table to save the image code.We can show the image in CDetailview from database table of yii framework. Here i used showphoto_from_database() function to display the image from database. showproof_from_image_folder() is used to fetch uploaded image url from database and display.view.php <?php $this->widget('zii.widgets.CDetailView', array( 'data'=>$model, 'attributes'=>array( array( 'name'=>'photo_id', 'type'=>'raw', 'value'=>$model->showphoto_from_database(), ), array( 'name'=>'vproof_id', 'type'=>'raw', 'value'=>$model->showproof_from_image_folder(), ) ), […]... Read More »