get_cfg_var
get_cfg_var
Gets the value of a PHP configuration option
Syntax:
string get_cfg_var ( string varname)
Example:
add this line to the php.ini file:
temp_dir=123
<?php
function get_directory()
{
$var = get_cfg_var( “temp_dir” );
return ( $var == null ) ? “temp” : $var;
}
echo ( get_directory());
?>
Output:
123
