简体   繁体   中英

How do I see a php.ini parameter via code?

I'm developing an app in php and want to see how is set the memory_limit (or any other) parameter on php.ini via code.

It's possible?

Use ini_get().

More information can be found at :

http://www.php.net/manual/en/function.ini-get.php

是的你可以:看看ini_get()

$value = ini_get('memory_limit');

You can use ini_set() function to set memory_limit or ini_get() to get the memory_limit in PHP.

Example:

ini_set('memory_limit', '128M');
ini_get('memory_limit');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM