Am facing image display problem for the last two days.I can upload image but i cant display that image.How to display image .please help me
In View.php
<? echo CHtml::link(image,array('displaySavedImage','id'=>$model->primaryKey)); ?>
In Controller.php
public function actionDisplaySavedImage()
{
$model=$this->loadModel($_GET['id']);
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Transfer-Encoding: binary');
header('Content-length: '.$model->file_size);
header('Content-Type: '.$model->file_type);
header('Content-Disposition: attachment; filename='.$model->file_name);
but i cant get that image

Help













