Home > php教程 > php手册 > ini_set /ini_get函数功能-----PHP

ini_set /ini_get函数功能-----PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:29:15
Original
984 people have browsed it

配置PHP环境时,我们记得最初的一步就是修改php.ini文件,但是当我们在虚拟机中运行脚本,或者是我们因为其他的原因没有修改php.ini的权限时,我们该怎么办?

ini_set()函数提供了在脚本中动态修改php.ini的方法,并且在脚本执行结束后修改失效,因此经常用在程序的配置中。

 

ini_set函数接收两个参数,其一为原始的配置项名称,第二个为要设置该配置项的新值。ini_set和ini_get的合作很合适,示例如下:

 

 
 

并不是所有的配置项都能用ini_set设置,具体能被配置的见附录

 

更详细的请参考:php.net

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template