Weird behaviour - image dissappears |
[eluser]The Mask[/eluser]
I have an 'About' page that is called by an 'About' controller... function index() { $this->load->view( 'about_view' ); } This works fine when called as: http://www.mysite.com/about However, if I change my controller to include a method that does exactly the same, an image at the top of the page dissappears. i.e. http://www.mysite.com/about/test and in my controller... function test() { $this->load->view( 'about_view' ); } So the same view is being loaded but an image is not shown. Any ideas, it's driving me nuts! I have stripped everything out of the controller and view to leave basically what is above.
[eluser]Bramme[/eluser]
what's the path of your image? there's a huge difference between <img src="images/blah.gif"> or <img src="/images/blah.gif"> I'm guessing you've got smth like the first and you need smth like the second. (it happened to me on the current site i'm doing)
[eluser]extra_rice[/eluser]
[quote author="The Mask" date="1215630994"]All sorted. Thanks very much![/quote] so how did you solve it?
[eluser]Dagobert Renouf[/eluser]
hi guys, I have a similar probleme here. When I request my page with "index.php" image show up. But if I just drop the index.php from the url they won't show up, wtf ? The path is '../files/' and I tried a lot of different ones. I'm trying to target : "www/codeIgniter/files"
[eluser]The Mask[/eluser]
My image src was set to "images/xxx.jpg", changed it to "/images/xxx.jpg" and it works fine now. It was aa simple as that.
[eluser]Dagobert Renouf[/eluser]
thank you themask : To avoid the bug I need to do this : /codeigniter/images/xxx.jpg I don't know why this differs from you but whatever it works. |
Welcome Guest, Not a member yet? Register Sign In |