你如何获得PHP master ini值

PHPinfo中,它会显示ini设置的“Master”和“Local”值.

我想比较它们以确定自脚本启动以来设置是否已更改.

获取本地值很容易:

<?PHP
$local = ini_get('setting');

但我找不到任何描述如何获得主值的东西.

解决方法:

我认为get_cfg_var()就是你要找的.

引用a comment in the manual

The difference between ini_get() and get_cfg_var() is as follows:

  • ini_get(): returns the current value in .htaccess or as defined in PHP_INI_USER or PHP_INI_PERDIR

  • get_cfg_var(): returns the values defined in the PHP.ini

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...