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

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -