Blogger Information
Blog 263
fans 3
comment 2
visits 113057
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP获取和操作配置文件php.ini的几个函数介绍
福哥的博客
Original
1818 people have browsed it
  1. ini_get()获取配置参数,ini_set()设置配置参数

<?php
echo ini_get('display_errors'); //1
//动态修改php.ini配置信息,脚本执行后失效
ini_set('display_errors',0);
echo ini_get('display_errors');//0

2.ini_get_all()获取所有配置信息

<?php
//打印所有配置信息,巨多。。。
print_r(ini_get_all());

3.ini_restore()恢复配置信息到原始值

<?php
echo ini_get('display_errors'); //1
//动态修改php.ini配置信息,脚本执行后失效
ini_set('display_errors',0);
ini_restore('display_errors');
echo ini_get('display_errors');//1


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post