[英]How to check php_ini variables are set?
I am overriding php.ini variables in my code.我在我的代码中覆盖了 php.ini 变量。 (ini_set("memory_limit", -1);)
(ini_set("memory_limit", -1);)
How can i make sure it is set.我怎样才能确保它已设置。 Am using windows machine.
我正在使用 windows 机器。
Is there any way i can read variable by variable with some GLOBAL array or something?有什么办法可以用一些 GLOBAL 数组或其他东西逐个变量地读取变量吗?
Once i set variable, i want to read it in the next line for testing.一旦我设置了变量,我想在下一行中读取它进行测试。
You can use ini_get('memory_limit');
您可以使用
ini_get('memory_limit');
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:请参阅下面的链接以获取工作示例:
Is this what you are after?这就是你所追求的吗? PHP manual
PHP手册
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.