<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[[函数对比]htmlspecialchars、strip_tags和addslashes的区别]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Tue, 05 Jul 2011 02:12:52 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	一直搞不明白三者区别，今天写下。<br/>htmlspecialchars() 函数把一些预定义的字符转换为 HTML 实体。<br/>预定义的字符是：<br/>&nbsp;&nbsp;&nbsp;&nbsp;&amp; （和号） 成为 &amp;amp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&quot; （双引号） 成为 &amp;quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#039; （单引号） 成为 &amp;#039;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt; （小于） 成为 &amp;lt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&gt; （大于） 成为 &amp;gt;<br/><br/>addslashes() 函数在指定的预定义字符前添加反斜杠。<br/>这些预定义字符是：<br/>&nbsp;&nbsp;&nbsp;&nbsp;单引号 (&#039;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;双引号 (&quot;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;反斜杠 (&#92;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;NULL<br/><textarea name="code" class="html" rows="15" cols="100">
&lt;?php
$str = &quot;Who&#039;s John Adams?&quot;;
echo $str . &quot; This is not safe in a database query.&lt;br /&gt;&quot;;
echo de&gt;addslashes($str)de&gt; . &quot; This is safe in a database query.&quot;;
?&gt;
</textarea><br/>Who&#039;s John Adams? This is not safe in a database query.<br/>Who&#92;&#039;s John Adams? This is safe in a database query.<br/><br/>strip_tags() 函数剥去 HTML、XML 以及 PHP 的标签。<br/>即不带任何的标记，转换成字符串。<br/><textarea name="code" class="html" rows="15" cols="100">
&lt;?php
echo strip_tags(&quot;Hello &lt;b&gt;&lt;i&gt;world!&lt;/i&gt;&lt;/b&gt;&quot;,de&gt;&quot;&lt;b&gt;&quot;de&gt;);
?&gt;
</textarea><br/>strip_tags(string,allow)<br/>参数&nbsp;&nbsp; 描述<br/>string&nbsp;&nbsp; 必需。规定要检查的字符串。<br/>allow&nbsp;&nbsp; 可选。规定允许的标签。这些标签不会被删除&nbsp;&nbsp;
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [函数对比]htmlspecialchars、strip_tags和addslashes的区别]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>