配置可被设定范围
这些模式决定着一个 PHP 的指令在何时何地,是否能够被设定。手册中的每个指令都有其所属的模式。例如有些指令可以在 PHP 脚本中用 ini_set() 来设定,而有些则只能在 php.ini 或 httpd.conf 中。
例如
output_buffering
指令是属于
PHP_INI_PERDIR
,因而就不能用
ini_set() 来设定。但是
display_errors
指令是属于
PHP_INI_ALL
因而就可以在任何地方被设定,包括
ini_set()。
模式 | 含义 |
---|---|
PHP_INI_USER |
可在用户脚本(例如 ini_set())或 Windows 注册表以及 .user.ini 中设定 |
PHP_INI_PERDIR |
可在 php.ini,.htaccess 或 httpd.conf 中设定 |
PHP_INI_SYSTEM |
可在 php.ini 或 httpd.conf 中设定 |
PHP_INI_ALL |
可在任何地方设定 |

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/configuration.changes.modes.php