Display image in CdetailView

I want to display an image in the CdetailView for my actor model.




<?php $this->widget('zii.widgets.CDetailView', array(

	'data'=>$model,

	'attributes'=>array(

		'actor_id',

		array(        

           	     'name'=>'picture',

                     'value'=>  '<img src="../test/images/actor.jpg" alt="alt" width="200" height="150" />',

           	),


		'last_update',

	),

)); ?>

 



In the corresponding view, the image is not displayed, instead is displayed the text. The path is correctly chosen, but i encounter problems on the image render.

See this topic

Use


CHtml::image($src);

with a exact stored Directory path of the image. Like




$bUrl=Yii::app()->baseUrl; //base URL

$tUrl=Yii::app()->theme->baseUrl; //theme URl



Where is your image is stored in a project.try this might be this will help you.