how to get url with the help of server variable
$domain = $_SERVER['HTTP_HOST'];
// find out the path to the current file:
$path = $_SERVER['SCRIPT_NAME'];
echo $path;
$url = “http://” . $domain . $path ;

$domain = $_SERVER['HTTP_HOST'];
// find out the path to the current file:
$path = $_SERVER['SCRIPT_NAME'];
echo $path;
$url = “http://” . $domain . $path ;
Leave a Reply