<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.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://www.jackxiang.com/post//</link>
<title><![CDATA[php上传图片到mysql并显示]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Thu, 18 Sep 2008 02:04:07 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	http://blog.chinaunix.net/u/8780/showart.php?id=313714<br/>http://www.phpweblog.net/LiveStar/archive/2008/03/31/3102.html<br/><br/><br/>php：<br/><br/><div class="code">&lt;?php<br/>$data = addslashes(fread(fopen($_FILES&#91;&#039;userfile&#039;&#93;&#91;&#039;tmp_name&#039;&#93;, &quot;r&quot;), filesize($_FILES&#91;&#039;userfile&#039;&#93;&#91;&#039;tmp_name&#039;&#93;)));<br/>$data1 = fread(fopen($_FILES&#91;&#039;userfile&#039;&#93;&#91;&#039;tmp_name&#039;&#93;, &quot;r&quot;), filesize($_FILES&#91;&#039;userfile&#039;&#93;&#91;&#039;tmp_name&#039;&#93;));<br/>$type = &quot;image/pjpeg&quot;;<br/>Header( &quot;Content-type: $type&quot;);<br/>echo $data1;//不能用$data由于用了函数 addslashes会显示不了图片的<br/>?&gt;</div><br/><br/><br/>默认情况下，PHP 指令 magic_quotes_gpc 为 on，它主要是对所有的 GET、POST 和 COOKIE 数据自动运行 addslashes()。不要对已经被 magic_quotes_gpc 转义过的字符串使用 addslashes()，因为这样会导致双层转义。遇到这种情况时可以使用函数 get_magic_quotes_gpc() 进行检测。 <br/><br/>html：<br/><br/><div class="code">&lt;form id=&quot;form1&quot; name=&quot;form1&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot; action=&quot;http://app.space.sina.com.cn/upload.php&quot;&gt;<br/>&nbsp;&nbsp;&lt;label&gt;<br/>&nbsp;&nbsp;&lt;input type=&quot;file&quot; name=&quot;userfile&quot; id=&quot;fileField&quot; /&gt;<br/>&nbsp;&nbsp;&lt;/label&gt;<br/>&nbsp;&nbsp;&lt;label&gt;<br/>&nbsp;&nbsp;&lt;input type=&quot;submit&quot; name=&quot;button&quot; id=&quot;button&quot; value=&quot;upload&quot; /&gt;<br/>&nbsp;&nbsp;&lt;/label&gt;<br/>&lt;/form&gt;</div>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] php上传图片到mysql并显示]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>