Your Open Source

 
Related Posts

get Current location/URL

The getURL() function used to get the CURRENT page location with query strings etc., the function as follows,


function getURL(){
$url = 'http://'.$_SERVER['HTTP_HOST'];
if($_SERVER['QUERY_STRING'] !='') $url .= $_SERVER['SCRIPT_NAME'] .'?'.$_SERVER['QUERY_STRING'];
else $url .= $_SERVER['REQUEST_URI'];
return $url;

}

  • hits 213
  • datetime Jul 04 09 04:59:09
  • author Sekar
  • rating

Rating : 12345
Tags :- PHP

Answers

No Answers..
Your Name:
Your Answers :
<> is a code tag
Preview
Enter the verification code: