How to show uploaded image in view page? I am new in yii, I am unable to fix this please help me -


in myprofile.php

 <?php echo chtml::image(yii::app()->request- >baseurl.'/xampp/htdocs/myapp/images/'.$model- >image,"image",array("width"=>200,"hieght"=>200)); ?>  

your image url incorrect.

yii::app()->request- >baseurl.'/xampp/htdocs/myapp/images/'.$model- >image

should change into:

yii::app()->request->baseurl.'/images/'.$model->image


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -