On Thu, Aug 16, 2001 at 09:57:20PM +0700, Paul S. wrote:
> I design a website on a PC, and upload it to UNIX. Of course, there are
> always one or two variables that I have to keep track of as to
> whetherteh server is UNIX or PC. There MUST be a simple way to test
>
> if (the OS is Windows) {
> $siteurl = "http:// www.website.com/ ";
> $mysqlpasswordfilelocation = " ... outsideroot.txt ";
> }else{
> $siteurl = "http://127.0.0.1/";
> $mysqlpasswordfilelocation = " ...outsideroot.txt ";
> }
>
> ???
Paul,
You could check one of the following variables:
$HTTP_SERVER_VARS{"OSTYPE"}
$HTTP_SERVER_VARS{"SERVER_NAME"}
$HTTP_SERVER_VARS{"SERVER_ADDR"}
$HTTP_SERVER_VARS{"HTTP_HOST"}
or
$HTTP_SERVER_VARS{"DOCUMENT_ROOT"}
Check phpinfo(), it gives some really usefull info.
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]