פרק 40. Initialization File Support




The PHP_INI_ENTRY() macro accepts four parameters: the entry name, the entry value, its change permissions, and a pointer to a change-notification handler. Both entry name and value must be specified as strings, regardless of whether they really are strings or integers.

PHP_INI_SYSTEM allows a change only directly in the php3.ini file ; PHP_INI_USER allows a change to be overridden by a user at runtime using additional configuration files , such as .htaccess ; and PHP_INI_ALL PHP_INI_SYSTEM allows a change only directly in the php3.ini file ; PHP_INI_USER allows a change to be overridden by a user at runtime using additional configuration files , such as .htaccess ; and PHP_INI_ALL allows changes to be made without restrictions .




The new value is given to the change handler as string in the variable new_value . When looking at the definition of PHP_INI_MH , you actually have a few parameters to use:



All these definitions can be found in php_ini.h . Your message handler will have access to a structure that contains the full entry, the new value, its length, and three optional arguments. These optional arguments can be specified with the additional macros PHP_INI_ENTRY1 (allowing one additional argument), PHP_INI_ENTRY2 (allowing two additional arguments), and PHP_INI_ENTRY3 (allowing three additional arguments).

Access to initialization entries can also be handled with the macros shown in טבלה 40-1 .

טבלה 40-1 .