jd2007 Posted September 23, 2007 Share Posted September 23, 2007 What function to use to get the current url ? Link to comment https://forums.phpfreaks.com/topic/70336-what-function-to-use-to-get-the-current-url/ Share on other sites More sharing options...
Lumio Posted September 23, 2007 Share Posted September 23, 2007 Not a function, but a Global-Variable like $_SERVER Link to comment https://forums.phpfreaks.com/topic/70336-what-function-to-use-to-get-the-current-url/#findComment-353339 Share on other sites More sharing options...
mezise Posted September 23, 2007 Share Posted September 23, 2007 Hi, yes, as Lumio said. You need to combine the url from a few entries in $_SERVER global array: $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI']. And check $_SERVER['HTTPS'] to apply "https://" if "on" otherwise "http://". Michal Link to comment https://forums.phpfreaks.com/topic/70336-what-function-to-use-to-get-the-current-url/#findComment-353353 Share on other sites More sharing options...
jd2007 Posted September 29, 2007 Author Share Posted September 29, 2007 thanks Link to comment https://forums.phpfreaks.com/topic/70336-what-function-to-use-to-get-the-current-url/#findComment-357866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.