How To Get The Uploaded Image And Display

Here i am uploading the images into the seperate folder which is in application.protected.uploads but how get that image from the folder and display on the screen any help please here is my uploaded code


$dir = Yii::getPathOfAlias(‘application.protected.uploads’);

	$uploaded = false;


	$model = new Upload();


	if (isset($_POST['Upload']))


		$model->attributes = $_POST['Upload'];

		$file = CUploadedFile::getInstance($model,'file');

		if ($model->validate())


			$uploaded = $file->saveAs($dir. '/' .$file->getName());



view :

<?php if ($uploaded): ?>

<p>File was uploaded. Check <?php echo $dir?> . </p>

<?php endif ?>

<?php echo CHtml::beginForm(’’,‘post’,array


<?php echo CHtml::error($model, ‘file’)?>

<?php echo CHtml::activeFileField($model, ‘file’)?>

<?php echo CHtml::submitButton(‘Upload’)?>

<?php echo CHtml::endForm()?>

echo $form->labelEx($model,‘logo’);

echo $form->fileField($model,‘logo’,array(),array(‘tabindex’=>13));



echo CHtml::image(Yii::app()-&gt;controller-&gt;createUrl('site/loadImage/'.&#036;model-&gt;logo), &quot;No Image&quot;,array(&quot;width&quot;=&gt;&quot;175px&quot;,&quot;height&quot;=&gt;&quot;70px&quot;));


did u get the solution? help me please