Welcome Guest, Not a member yet? Register   Sign In
View loses the path as the case of the controller call
#2

Don't use a relative path, with "../.." stuff. That means it's looking down from the 2 dirs from the CURRENT url, so if you have more parameters in the url it looks in the wrong location!
Load the url helper (autoload) and use base_url(), like:
PHP Code:
<img src="<?php echo base_url('image/app/mypic.jpg'); ?>"  /> 

will produce
http://yoursite.com/image/app/mypic.jpg
for the image src
Reply


Messages In This Thread
RE: View loses the path as the case of the controller call - by CroNiX - 04-06-2015, 11:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB