You are here: Difference between get_cfg_var() and ini_get() « PHP Programming Language « IT news, forums, messages
Difference between get_cfg_var() and ini_get()

Posted by flconseil@yahoo.fr on 03/10/06 13:18

Hi,

I am writing a PHP library which uses some new configuration options in
php.ini. To read the values in my code, I have the choice between
get_cfg_var() and ini_get(). From the doc, I thought that they were
working almost the same way, except that get_cfg_var() gets its value
from the ini file, and ini_get() gives the current value, different if
ini_set was called.

Actually, when I have this line in php.ini :

Autoload.preload_include_path = On

I get this :

get_cfg_var('Autoload.preload_include_path') = string(1) "1" => OK

ini_get('Autoload.preload_include_path') = string(0) "" => Strange

>From the doc again, it means that ini_get() fails.

So, my questions are :

- does ini_get() support only PHP predefined configuration options (or
configuration options defined by an extension) ?
- If it is not the case, why doesn't it read my option ?

Thanks in advance

François

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация