Welcome Guest, Not a member yet? Register   Sign In
Newbie : Image path problem
#1

[eluser]fusionblu[/eluser]
Hi all,
I am not sure if I have configured CI correctly. I have a controller with a function that does some processing and calls a couple of 'views' [body and footer]. This function is called from a URL and params are passed. The strange thing is that all the image paths in the views are getting rewritten (base url appended) and I have broken images on the page.

Actual image path in view code is "images/some_image.gif"
getting rewritten as - "http://localhost/index.php/myController/myFunction/images/some_image.gif"

Any help appreciated.

Thanks,
Mike.
#2

[eluser]GSV Sleeper Service[/eluser]
use /images/some_image.gif or put

Code:
<base href="<?=base_url();?>" />
in the head section
#3

[eluser]fusionblu[/eluser]
Thanks -
<base href="<?=base_url();?>" />
That worked.




Theme © iAndrew 2016 - Forum software by © MyBB