<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[屏蔽php脚本错误提示]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[代码编程]]></category>
<pubDate>Sat, 08 Sep 2007 16:38:26 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	方法一、在有可能出错的函数前加@,然后or &nbsp; die("") &nbsp; &nbsp; <br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;如： &nbsp; <br/> &nbsp; &nbsp; &nbsp; &nbsp; @mysql_connect(...) &nbsp; or &nbsp; die("Database &nbsp; Connect &nbsp; Error")<br/><br/>方法二、编辑php.ini &nbsp; ，查找"display_errors &nbsp; =" &nbsp; ，将“=”后面的值改为"off。<br/><br/>方法三、在php脚本前加error_reporting(0)，屏蔽所有错误提示。<br/><br/>error_reporting<br/>配置错误信息回报的等级。<br/><br/>语法: int error_reporting(int [level]);<br/><br/>返回值: 整数<br/><br/>函数种类: PHP 系统功能<br/><br/><br/><br/><br/>内容说明 <br/><br/><br/>本函数用来配置错误信息回报的等级，参数 level 是一个整数的位遮罩 (bitmask)，见下表。<br/><br/>遮罩值 表示名称 <br/>1 E_ERROR <br/>2 E_WARNING <br/>4 E_PARSE <br/>8 E_NOTICE <br/>16 E_CORE_ERROR <br/>32 E_CORE_WARNING <br/><br/><br/><br/>E_NOTICE 表示一般情形不记录，只有程序有错误情形时才用到，例如企图存取一个不存在的变量，或是呼叫 stat() 函数检视不存在的文件。 <br/>E_WARNING 通常都会显示出来，但不会中断程序的执行。这对除错很有效。例如：用有问题的正则表达式呼叫 ereg()。 <br/>E_ERROR 通常会显示出来，亦会中断程序执行。意即用这个遮罩无法追查到内存配置或其它的错误。 <br/>E_PARSE 从语法中解析错误。 <br/>E_CORE_ERROR 类似 E_ERROR，但不包括 PHP 核心造成的错误。 <br/>E_CORE_WARNING 类似 E_WARNING，但不包括 PHP 核心错误警告。<br/>error_reporting( 7 ) = error_reporting( 1+2+4) = error_reporting(E_ERROR &#124; E_WARING &#124; E_PARSE)
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] 屏蔽php脚本错误提示]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>