PHP Determining the current url -
I need to modify my function to bring me back to my current function. Here is my current function:
function getLinkFromHost ($ url) {$ port = $ _SERVER ['REMOTE_PORT']; $ Server = $ _SERVER ['HTTP_HOST']; If ($ port == 443) {$ type = "https"; } And {$ type = "http"; } Return type $ ": //" $ server "/" $ Url; }
$ _ Take a look at the server ['REQUEST_URI'] < / Code> or
$ _ SERVER ['SCRIPT_NAME']
(from manual entry)
Comments
Post a Comment