![]() |
Image Directory - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Image Directory (/showthread.php?tid=22626) |
Image Directory - El Forum - 09-15-2009 [eluser]Unknown[/eluser] Im having problem with the image directory. I have a controller file named login.php Code: <?php when the website first loads, it automaticlly loads this controller with the default function of "index" Code: function index() which loads the login form. Code: <div id="ab_box_title"> the problem is here when i press submit. After i press submit with the wrong username and password, it "$this->index();". then the url becomes http://localhost/demo/index.php/login/validate_credentials after that, the images wont show up anymore unless i change "images/" to "../../images" but that makes the default page "http://localhost/demo/index.php" missing the images How do i approach to fix this? without using absolute links. Image Directory - El Forum - 09-15-2009 [eluser]InsiteFX[/eluser] Look in the user guide for the html helper img tag. Enjoy InsiteFX Image Directory - El Forum - 09-15-2009 [eluser]Unknown[/eluser] So there is no other way then generate an absolute link? Which the IMg helper does Image Directory - El Forum - 09-15-2009 [eluser]InsiteFX[/eluser] Well you could also use the url helper and do a echo base_url();assets\images or were ever you have them. Enjoy InsiteFX |