![]() |
Retrieve current host url? So this is a second hand site* and routinely throughout it* the programmer made functions that generate various useful links* but he did it in such a way that the domain for the site was hard coded into these function. This is causing problems for myself and other developers running local installs and testing on staging servers. As such* I would like to know if there's a standard and safe phpws way to get the current hostname* or whatever the hostname is configured to be for the site* and use that in my url helpers? So instead of: return "http://www.mysite.com/index.php?mod=mymod&tab=mytab"* I can do: return getSiteRoot() . '/index.php?mod=etc..'; ? |
| الساعة الآن 06:00 AM |
Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By
Almuhajir