开发者

How to check php_ini variables are set?

开发者 https://www.devze.com 2023-03-17 11:32 出处:网络
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.

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

精彩评论

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

关注公众号