Welcome Guest, Not a member yet? Register   Sign In
how to display image an image in codeigniter 2.0
#1

[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...
#2

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

InsiteFX
#3

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




Theme © iAndrew 2016 - Forum software by © MyBB