MySQL Database Find out the Host
Posted: Wed Sep 20, 2006 2:09 pm
Is there a way to get PHP to tell you the host of a database, when its at localhost, so that if returns like a \home\database\data\ or what ever the thing would be.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
php.net wrote:$_SERVER['SERVER_ADDR']
The IP address of the server under which the current script is executing.
$_SERVER['SERVER_NAME']
The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host.