获取php.ini设置变量

 ini_get
(PHP 4, PHP 5)

ini_get — Gets the value of a configuration option


说明


string ini_get( string varname )


Returns the value of the configuration option on success.

 

参数
varname
The configuration option name.


返回值
Returns the value of the configuration option as a string on success, or an empty string on failure.

 

范例
例 1. A few ini_get() examples



 

上例的输出类似于:

display_errors = 1
register_globals = 0
post_max_size = 8M
post_max_size+1 = 9
post_max_size in bytes = 8388608 

Leave a Reply

Your email address will not be published.