开发者

How to check php_ini variables are set?

I am overriding php.ini variables in my code. (ini_set("memory_limit", -1);)

How can i make sure it is set. Am using windows machine.

Is there any way i can read variable by variable with some GLOBAL array or something ?

Once i set variable, i want to read it in the 开发者_StackOverflownext line for testing.


Use the function ini_get.


You can use ini_get('memory_limit');


Is this what you are after? PHP manual


Adding an live example

<?php

echo ini_get("memory_limit");

?>

Output:
128M (based on the value set in your php.ini).

Please see the link below for working example:

http://codepad.org/vm6iVDVj

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜