Re: ini_get() vs. get_cfg_var()
| From: | Zeev Suraski | Date: | Fri, 02 Feb 2001 14:26:13 +0000 |
| Subject: | Re: ini_get() vs. get_cfg_var() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37838@lists.php.net to get a copy of this message | ||
get_cfg_var() is an old PHP 3.0 era function, that returns the value for a directive in the php.ini file. This value may be valid or invalid, depending on whether it was overwritten by other configuration methods (e.g., httpd.conf or .htaccess). This function will always return the value that was typed in php.ini, if any.
ini_get() is a new PHP 4.0 function, that uses the new INI subsystem introduced in 4.0. It will always return the active value, and not necessarily the value that was in the php.ini. Generally, unless you're writing a script that actually deals with the php.ini file, you should always use this function and not get_cfg_var().
Zeev
At 16:10 2/2/2001, Teodor Cimpoesu wrote:
What's the difference between these two functions? from the manual I couldn't figure any: get_cfg_var -- Get the value of a PHP configuration option.-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/ini_get -- Get the value of a configuration optionis ini_get just an alias to get_cfg_var() or vice versa somehow? dunno :) TIA -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net