ini_set Sets the value of a configuration option php函数


ini_set

(PHP 4, PHP 5)

ini_setSets the value of a configuration option

说明

string ini_set ( string $varname , string $newvalue )

Sets the value of the given configuration option. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.

参数

varname

Not all the available options can be changed using ini_set(). There is a list of all available options in the appendix.

newvalue

The new value for the option.

返回值

Returns the old value on success, FALSE on failure.

范例

Example #1 Setting an ini option

<?php
echo ini_get('display_errors');

if (!
ini_get('display_errors')) {
    
ini_set('display_errors'1);
}

echo 
ini_get('display_errors');
?>

参见

  • get_cfg_var() - Gets the value of a PHP configuration option
  • ini_get() - Gets the value of a configuration option
  • ini_get_all() - Gets all configuration options
  • ini_restore() - Restores the value of a configuration option
  • How to change configuration settings



相关阅读:
interface_exists 检查接口是否已被定义
intval 获取变量的整数值
in_array 检查数组中是否存在某个值
ip2long Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address
iptcembed 将二进制 IPTC 数据嵌入到一幅 JPEG 图像中
iptcparse 将二进制 IPTC http://www.iptc.org/ 块解析为单个标记
isset 检测变量是否设置
is_a 如果对象属于该类或该类是此对象的父类则返回 TRUE
is_array 检测变量是否是数组
is_bool 检测变量是否是布尔型
is_callable 检测参数是否为合法的可调用结构
is_dir 判断给定文件名是否是一个目录
is_double is_float 的别名
is_executable 判断给定文件名是否可执行
快速导航

Copyright © 2016 phpStudy |