Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter URLs: linking problem to images
#1

[eluser]iConTM[/eluser]
When I try to access a page by following url structure
the images on my site wont show.

http://www.mysite.com/controller/function

in this case no problem:
http://www.mysite.com/controller

Can someone help me out?
#2

[eluser]mi6crazyheart[/eluser]
Can u show u'r controller file codes..... ?
#3

[eluser]umefarooq[/eluser]
here is solution to your problem in two ways

Code:
first in html call base_url function your path will always to your image path
<img src="&lt;?=base_url()?&gt;/image_path/image.jpg" />

second method is to call CI html helper img() function it will work same as above code

&lt;? echo img("image_path/image.jpg")?&gt;

for more information read user guide
#4

[eluser]iConTM[/eluser]
Thank you. Works great Wink




Theme © iAndrew 2016 - Forum software by © MyBB