Home >Backend Development >PHP Tutorial >Dynamically change the system ini configuration-talk about some new functions in php4_PHP tutorial

Dynamically change the system ini configuration-talk about some new functions in php4_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:24:48950browse

These functions are
ini_alter — change the configuration parameter value
ini_get — get the configuration parameter value
ini_restore — restore the original configuration parameter value
ini_set — set the configuration parameter value
For example, you can use

print(ini_get("include_path"));
ini_set("include_path","f:");
print(ini_get("include_path"));
ini_restore( "include_path");
print(ini_get("include_path"));
ini_set("include_path","f:php2000");
print(ini_get("include_path"));
?>
The output is (I added newlines for comparison)
f:php2000
f:
f:
f:php2000
I don’t know why the restore error??? ???
In this way, we can change the parameter configuration values ​​​​at any time in the program. At the same time, I found that when executing again, the default parameters of the system have not changed, that is to say, the change is limited to the current script running period.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532117.htmlTechArticleThese functions are ini_alter — change the configuration parameter value ini_get — get the configuration parameter value ini_restore — restore the original configuration parameter value ini_set — Set configuration parameter values ​​such as get inc...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn