CodeIgniter Forums
how to display image an image in codeigniter 2.0 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how to display image an image in codeigniter 2.0 (/showthread.php?tid=38866)



how to display image an image in codeigniter 2.0 - El Forum - 02-22-2011

[eluser]manishchndk[/eluser]
Dear friends i am facing problem while displaying image in codeigniter, here are the settings that i have done with codeigniter 2.0

My project name is car

in config.php i set the base_url variable as
$config['base_url'] = 'http://localhost/car/';

and in default controller i loaded a helper for base_url()
$this->load->helper('url');

i created one folder and named it 'images' in application folder i have written below line for displaying images in view folder in register.php

img src="<?php echo base_url();?>;application/images/dell_logo.jpg" alt="dell logo"


but the output is: it's only showing me alt text on the screen on the contrary it is working fine with the earlier version of codeigniter 1.7


if anybody have any idea about this help me please...


how to display image an image in codeigniter 2.0 - El Forum - 02-22-2011

[eluser]InsiteFX[/eluser]
Try adding this to your .htaccess file.
Code:
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)

InsiteFX


how to display image an image in codeigniter 2.0 - El Forum - 02-22-2011

[eluser]manishchndk[/eluser]
Thank you my friend i really appreciate your help, the answer you suggested simply works