![]() |
Performance - base_url()-Call - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Performance - base_url()-Call (/showthread.php?tid=15134) |
Performance - base_url()-Call - El Forum - 01-27-2009 [eluser]noro[/eluser] Ok, not that exact title, but dont know what I should use instead. I am working at an homepage project and I have a question. At the moment my documents look like this: Code: <link rel="stylesheet" href="<?=base_url();?>css/temp.css" type="text/css" /> Is that the best way to call the CSS(JS,AJAX, etc.)-Files? Is there a difference between href="../css/temp.css" and href="<?=base_url();?>...."? Otherwise the base_url() method doesn't look that elegant. Thanx Noro Performance - base_url()-Call - El Forum - 01-27-2009 [eluser]umefarooq[/eluser] here is solution for your problem use this library for you javascript and css files. http://ellislab.com/forums/viewthread/78931/ Performance - base_url()-Call - El Forum - 01-27-2009 [eluser]noro[/eluser] Thanks a lot. Provides also other great stuff. ^^ Is there somethig like this for image-files? Because writing <img src="<?=base_url()?>/img/" />, my Designer starts to hate me ^^ Performance - base_url()-Call - El Forum - 01-28-2009 [eluser]umefarooq[/eluser] just let me know where you are putting your img foler either in application folder or on the root of you project. then i can help you. Performance - base_url()-Call - El Forum - 01-28-2009 [eluser]noro[/eluser] I put them in the root folder. Think, that describes it also:: Ci-RootFolder |----image |----js |----System-Folder |------------App-Folder |