new simple function for URI class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: new simple function for URI class (/showthread.php?tid=14040) |
new simple function for URI class - El Forum - 12-16-2008 [eluser]Iverson[/eluser] I run multiple applications for separate clients on one CI install. However, I still want them to be able to access my top level domain so I created a simple function almost identical to site_url(); In your application/config.php, add Code: // Add the trailing slash! In <b>url_helper.php</b>, add Code: /** Now all you have to do is call "top_url()" and it'll take you to your top level domain. Might not be useful for others, but I figured I'd share it anyway. Suggestions welcome. new simple function for URI class - El Forum - 12-16-2008 [eluser]xwero[/eluser] I did a similar function that requires no additional config setting Code: function domain($url='') new simple function for URI class - El Forum - 12-16-2008 [eluser]Iverson[/eluser] Sweet! Thanks! |