Friday, May 31, 2013

How to get the current domain name and path in php


$scriptname=end(explode('/',$_SERVER['PHP_SELF']));
$scriptpath=str_replace($scriptname,'',$_SERVER['PHP_SELF']);
$scriptpath= $_SERVER['SERVER_NAME'] . $scriptpath;

1 comment:

Anonymous said...

Someone essentially lend a hand to make severely posts I might state.
This is the first time I frequented your website page and to this point?
I surprised with the analysis you made to make this particular post amazing.
Magnificent activity!

my webpage ... binary options software :: :
: