image src - 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 src (/showthread.php?tid=34010) |
image src - El Forum - 09-15-2010 [eluser]minagabriel[/eluser] i have this header code to call an image this is my view Code: <a href="<?php echo base_url(); ?> "> the image never load to my view my images folder is in codeigniter/images/logo.jpg "is thats where we place the folder "? is the codeigniter the root ? and what is the story of .htaccess how do i create it ? i need help as soon as you guys can thnx image src - El Forum - 09-16-2010 [eluser]techgnome[/eluser] You're using the base_url ... which points to what ever you set the base_url to in the config.php file... which should be your site root... I'm new to this, but I would hesitate to put anything into any folder other than application... the other folders in the system folder are part of what drives CI. I keep my images in two folders right off the site root... I've had to make a few adjustments to my src references to get it to work right, but that seems to be working. I'd say the images folder should be off the site root, or in the application folder (maybe even in the views folder.... eeeeh... maybe). -tg image src - El Forum - 09-16-2010 [eluser]danmontgomery[/eluser] Assets should not be in application, application shouldn't be treated as a filesystem, because as far as CI is concerned it isn't. Most people put an assets folder (or folders) at the same level as index.php, it makes accessing them significantly easier. The problem here, I'm guessing, is that there are spaces in the image src: Code: "<?php echo base_url();?>images/logo.jpg" |