本地值和主值有什么区别 [英] What is the difference between local value and master value

查看:105
本文介绍了本地值和主值有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我显示phpinfo();时,我看到两列:local valuemaster 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆