September 2001
Intermediate to advanced
768 pages
32h 45m
English
string get_cfg_var(string variable) Gets a PHP configuration option.
Returns:
Current setting of variable; FALSE on error
Description:
get_cfg_var() checks for a PHP configuration variable and returns the current setting if the variable exists. For example, this function can be used to determine whether adding backslashes is enabled by default, or needs to be performed before database entry. A list of these configuration options can be found in the phpinfo() function, although options set either in Apache or at compile time cannot be accessed using this function.
Example:
if (!$cfg = get_cfg_var("error_log")) {
echo "error_log not set.\n";
}
echo "Error log is in $cfg;
|
Read now
Unlock full access