Subject | Re: [firebird-php] firebird path |
---|---|
Author | Helen Borrie |
Post date | 2005-05-22T10:04:36Z |
At 08:32 AM 22/05/2005 +0100, you wrote:
From the online manual:
getenv -- Gets the value of an environment variable
Description
string getenv ( string varname )
Returns the value of the environment variable varname, or FALSE on an error.
<?php
// Example use of getenv()
$ip = getenv('FIREBIRD');
// Or simply use a Superglobal ($_SERVER or $_ENV)
$ip = $_SERVER['FIREBIRD'];
?>
You can see a list of all the environmental variables by using phpinfo().
You can find out what many of them mean by taking a look at the CGI
specification, specifically the page on environmental variables.
See also putenv(), apache_getenv() and Superglobals.
User Contributed Notes:
getenv
renko at <remove>virtual-life dot net
08-Nov-2004 09:40
The function 'getenv' does not work if your Server API is ASAPI (IIS).
So, try to don't use getenv('REMOTE_ADDR'), but $_SERVER["REMOTE_ADDR"].
Helen
>Anybody got a way of accessing the path to the firebird directory from PHP?This seems like a good reason for installing the FIREBIRD environment variable.
From the online manual:
getenv -- Gets the value of an environment variable
Description
string getenv ( string varname )
Returns the value of the environment variable varname, or FALSE on an error.
<?php
// Example use of getenv()
$ip = getenv('FIREBIRD');
// Or simply use a Superglobal ($_SERVER or $_ENV)
$ip = $_SERVER['FIREBIRD'];
?>
You can see a list of all the environmental variables by using phpinfo().
You can find out what many of them mean by taking a look at the CGI
specification, specifically the page on environmental variables.
See also putenv(), apache_getenv() and Superglobals.
User Contributed Notes:
getenv
renko at <remove>virtual-life dot net
08-Nov-2004 09:40
The function 'getenv' does not work if your Server API is ASAPI (IIS).
So, try to don't use getenv('REMOTE_ADDR'), but $_SERVER["REMOTE_ADDR"].
>I am trying to tidy up the installer on Tikipro and have a singleDe magic of concatenation. :-)
>niggle. I need to run isql to create the blank database and currently I
>have the path hard coded for my system. Obviously I'd like to replace
>that with something that does not need changing for windows/unix and
>different setups.
Helen