Re: FQDN of the server thru CLI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Venkat Venkataraju wrote:

i do not want to hardcode the hostname anywhere as these script will be copied onto many servers. is there a way i can find the fully qualified domain name thru PHP?


If the system has been configured correctly the following should work...

$hostname = trim(`hostname`); // note the backticks

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux