PHPChina 2008-2-23 16:20
函数前面@的问题
请问PHP中@除了不返回错误提示的作用外还有其他作用吗?
enze 2008-2-25 17:35
不过是负面作用罢了。。。
@符号抑制了错误后,会对程序执行的效率有一定的负面影响。
enze 2008-2-26 12:46
楼上的这个话说的不全面,
应该是:看来啥东西都会有作用的。
就像一个哲人说过的,万物自有他存在的道理。
sjtprruy 2008-3-15 16:16
第一:php.ini 中设置:error_reporting = E_ALL & ~ ( E_NOTICE ) 。如果还不想显示 warning 信息,只需要使用“|”运算符:error_reporting= E_ALL & ~ ( E_NOTICE | E_WARNING )。
第二,你代码首行写出以下范例
<?php
// Turn off all error reporting
error_reporting(0);
// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
// Report all PHP errors (bitwise 63 may be used in PHP 3)
error_reporting(E_ALL);
// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);
?>
ooeylufor 2008-5-12 02:42
再关注ing
再关注ing 非常谢谢楼主,顶一下
-------------------------
I love you not because of who you are, but because of who I am when I am with you.
我爱你,不是因为你是一个怎样的人,而是因为我喜欢与你在一起时的感觉。
Lineage2 powerleveling webpage:1.[url=http://www.oggsale.com/Archlord_gold/]archlord gold[/url],2.[url=http://www.oggsale.com/Lineage2_Adena/]lineage2 adena[/url],3.[url=http://www.oggsale.com/Lotro_us_powerleveling/]lotro powerleveling[/url],4.[url=http://www.oggsale.com/Lineage2_powerleveling/]Lineage2 powerleveling[/url],5.[url=http://www.tgacn.com/aoc-gold.html]age of conan gold[/url],