本地值和主值有什么区别 [英] What is the difference between local value and master value
问题描述
当我显示phpinfo();
时,我看到两列:local value
和master value
.网络服务器何时选择local value
,何时选择master value
?
When I display phpinfo();
i see two columns: local value
and master value
. When the web-server will choose local value
and when it will choose master value
?
推荐答案
master
是编译为PHP的值,或通过主php.ini
指令设置的值.例如在PHP执行任何代码之前启动时有效的值.
master
is either the value compiled into PHP, or set via a main php.ini
directive. e.g. The value that's in effect when PHP fires up, before it executes any of your code.
local
是您调用phpinfo()
时当前有效的值.此局部值是通过ini_set()
调用,httpd.conf/.htaccess中的php_value
指令等进行的任何覆盖的END结果.
local
is the value that's currently in effect at the moment you call phpinfo()
. This local value is the END result of any overrides that have taken place via ini_set()
calls, php_value
directives in httpd.conf/.htaccess, etc...
例如
php.ini: foo=bar
httpd.conf: php_value foo baz
.htaccess: php_value foo qux
ini_set: ini_set('foo', 'kittens');
鉴于,master
的值为qux
,而local
的值为kittens
.
Given that, the master
value is qux
, and the local
value is kittens
.
这篇关于本地值和主值有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!