get_cfg_var returns the value from php.ini directly,while the ini_get returns the runtime config value. I have tried it on PHP 5.1.6
get_cfg_varDescriptionstring get_cfg_var ( string varname )Returns the current value of the PHP configuration variable specified by varname, or FALSE if an error occurs. It will not return configuration information set when the PHP was compiled, or read from an Apache configuration file (using the php3_configuration_option directives). To check whether the system is using a configuration file, try retrieving the value of the cfg_file_path configuration setting. If this is available, a configuration file is being used. See also ini_get().
add a note
User Contributed Notes
surfchen at gmail dot com
04-Sep-2006 10:00
get_cfg_var returns the value from php.ini directly,while the ini_get returns the runtime config value. I have tried it on PHP 5.1.6
digitalife at 163 dot com
18-Jan-2003 05:51
ini_get() return the current value of the configuration option.
verdana at php dot net
05-Dec-2002 02:16
ini_get() return the current value of the configuration option.
matt at ibforums dot com
29-May-2002 07:43
If you are using PHP 4.0+ (and if not, why not!) use ini_get().
eric dot kidd at pobox dot com
12-Aug-2000 06:13
As implemented, this function is an odd wart--it calls cfg_get_string, which returns the value originally set in the config file, if any.
| ||