1, error_reporting(0); //设定错误报告的等级为0(不显示错误)
2, set_magic_quotes_runtime(0);//设定"魔法引用"为OFF(也就是不自动进行字符转义)
3, get_magic_quotes_gpc(); //获得"魔法引用"的状态(打开还是关闭)
4, @ini_get('register_globals'); //获得php.ini相应设置的状态."@"表示屏蔽错误./*
*以上不知对不对? 最好还是自己看手册
*/
2, set_magic_quotes_runtime(0);//设定"魔法引用"为OFF(也就是不自动进行字符转义)
3, get_magic_quotes_gpc(); //获得"魔法引用"的状态(打开还是关闭)
4, @ini_get('register_globals'); //获得php.ini相应设置的状态."@"表示屏蔽错误./*
*以上不知对不对? 最好还是自己看手册
*/
2.set_magic_quotes_runtime -- Sets the current active configuration setting of magic_quotes_runtime(0 for off, 1 for on)
3.See also: get_magic_quotes_gpc() and get_magic_quotes_runtime()
4.ini_get -- Gets the value of a configuration option
<?php
/*
Our php.ini contains the following settings:display_errors = On
register_globals = Off
post_max_size = 8M
*/echo 'display_errors = ' . ini_get('display_errors') . "\n";
echo 'register_globals = ' . ini_get('register_globals') . "\n";
echo 'post_max_size = ' . ini_get('post_max_size') . "\n";
echo 'post_max_size+1 = ' . (ini_get('post_max_size')+1) . "\n"; ?> This script will produce: display_errors = 1
register_globals = 0
post_max_size = 8M
post_max_size+1 = 9
关闭错误检测,不报告可能出现的错误2, set_magic_quotes_runtime(0);
默认如此。关闭在操作文件和数据库的自动转义3, get_magic_quotes_gpc();
取得当前magic_quotes_gpc开关的状态4, @ini_get('register_globals');
取得当前的register_globals开关状态