<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for idea&#039;s blog</title>
	<atom:link href="http://www.ideawu.net/blog/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ideawu.net/blog</link>
	<description>网络服务器架构, Linux C/C++服务器端开发, TCP/IP网络协议, PHP Web后端和Web前端开发, 网站架构.</description>
	<lastBuildDate>Fri, 13 Jan 2012 04:11:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1975</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Fri, 13 Jan 2012 04:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1975</guid>
		<description>Windows XP VPN 客户端设置, 连接时提示 “错误 768: 因为加密数据失败连接尝试失败” , 需要在控制面板-管理工具-服务里启动 IPSEC Services 服务.</description>
		<content:encoded><![CDATA[<p>Windows XP VPN 客户端设置, 连接时提示 “错误 768: 因为加密数据失败连接尝试失败” , 需要在控制面板-管理工具-服务里启动 IPSEC Services 服务.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Chrome浏览器必装的插件 by ideawu</title>
		<link>http://www.ideawu.net/blog/archives/625.html/comment-page-1#comment-1974</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Fri, 13 Jan 2012 04:07:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/?p=625#comment-1974</guid>
		<description>那就是技术风格的问题了. 看似方便用户, 但其实并不方便.</description>
		<content:encoded><![CDATA[<p>那就是技术风格的问题了. 看似方便用户, 但其实并不方便.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Chrome浏览器必装的插件 by lyman</title>
		<link>http://www.ideawu.net/blog/archives/625.html/comment-page-1#comment-1973</link>
		<dc:creator>lyman</dc:creator>
		<pubDate>Fri, 13 Jan 2012 03:06:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/?p=625#comment-1973</guid>
		<description>不止是代理，还有证书。是有意搞成这样子的，跟技术无关。估计是为了方便用户单点管理这些东西。</description>
		<content:encoded><![CDATA[<p>不止是代理，还有证书。是有意搞成这样子的，跟技术无关。估计是为了方便用户单点管理这些东西。</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1972</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Thu, 12 Jan 2012 09:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1972</guid>
		<description>Linux重定向到一个没有权限的文件时, 会报权限错误. 这种没法用sudo来解决, 但可以把重定向换为sudo tee. 如:

cat a.txt &#124; tee /root/ha.txt 1&gt;/dev/null

或者把来sh命令来执行:

sudo sh -c &quot;echo \&quot;www\&quot; &gt; /root/a.txt &quot;</description>
		<content:encoded><![CDATA[<p>Linux重定向到一个没有权限的文件时, 会报权限错误. 这种没法用sudo来解决, 但可以把重定向换为sudo tee. 如:</p>
<p>cat a.txt | tee /root/ha.txt 1&gt;/dev/null</p>
<p>或者把来sh命令来执行:</p>
<p>sudo sh -c &#8220;echo \&#8221;www\&#8221; > /root/a.txt &#8220;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1971</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Thu, 12 Jan 2012 04:00:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1971</guid>
		<description>解决ssh远程执行sudo, 输入密码时的回显问题: -tt 参数

ssh -tt my@remote.host sudo ls</description>
		<content:encoded><![CDATA[<p>解决ssh远程执行sudo, 输入密码时的回显问题: -tt 参数</p>
<p>ssh -tt <a href="mailto:my@remote.host">my@remote.host</a> sudo ls</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 鼠中无大将, 二冷充先锋 by &#8220;愤青&#8221;的转化 &#187; 笨蛋娱乐</title>
		<link>http://www.ideawu.net/blog/archives/583.html/comment-page-1#comment-1970</link>
		<dc:creator>&#8220;愤青&#8221;的转化 &#187; 笨蛋娱乐</dc:creator>
		<pubDate>Wed, 11 Jan 2012 12:55:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/archives/583.html#comment-1970</guid>
		<description>[...] 再看: 鼠中无大将, 二冷充先锋 [...]</description>
		<content:encoded><![CDATA[<p>[...] 再看: 鼠中无大将, 二冷充先锋 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1969</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Wed, 11 Jan 2012 08:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1969</guid>
		<description>Andante, 行板, 即指想走路一般的速度. Allegro, 快板, 即指快速. Presto, 急板, 即指极其快速的意思.</description>
		<content:encoded><![CDATA[<p>Andante, 行板, 即指想走路一般的速度. Allegro, 快板, 即指快速. Presto, 急板, 即指极其快速的意思.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 我们丢失了Model层 by MVC之患上肥胖症的Controller &#8211; 尘埃落定</title>
		<link>http://www.ideawu.net/blog/archives/474.html/comment-page-1#comment-1968</link>
		<dc:creator>MVC之患上肥胖症的Controller &#8211; 尘埃落定</dc:creator>
		<pubDate>Tue, 10 Jan 2012 16:07:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/archives/474.html#comment-1968</guid>
		<description>[...] 我们丢失了 Model 层 [...]</description>
		<content:encoded><![CDATA[<p>[...] 我们丢失了 Model 层 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1967</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Mon, 09 Jan 2012 08:51:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1967</guid>
		<description>如果返回的是JSON或者JSONP, 必须指定header(&quot;Content-Type: text/javascript&quot;); 或者注册htmlspecialchars(), 否则会被浏览器当作HTML解析, 从而可能被用作XSS攻击!</description>
		<content:encoded><![CDATA[<p>如果返回的是JSON或者JSONP, 必须指定header(&quot;Content-Type: text/javascript&quot;); 或者注册htmlspecialchars(), 否则会被浏览器当作HTML解析, 从而可能被用作XSS攻击!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 留言 by jmg</title>
		<link>http://www.ideawu.net/blog/guestbook/comment-page-4#comment-1966</link>
		<dc:creator>jmg</dc:creator>
		<pubDate>Sat, 07 Jan 2012 20:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://localhost:8080/ideawu_net/?page_id=373#comment-1966</guid>
		<description>thanks for sharing js_lottery</description>
		<content:encoded><![CDATA[<p>thanks for sharing js_lottery</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 我们丢失了Model层 by lovelucy</title>
		<link>http://www.ideawu.net/blog/archives/474.html/comment-page-1#comment-1965</link>
		<dc:creator>lovelucy</dc:creator>
		<pubDate>Fri, 06 Jan 2012 07:29:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/archives/474.html#comment-1965</guid>
		<description>我现在遇到了完全一样的状况，写了2个月才发现自己片面地理解了Model，以为Model只是用来做数据表的增删改查，于是所有的业务逻辑都放到了Controller，现在每个Controller都是几千行。。。

意识到问题的严重，通过搜索来到这里。请教博主后来是怎样重构的？做成Component放到components目录下，似乎可行，只是我还不太理解正常情况下components是做什么的。。直接继承AR类放到model目录下？这好像才是“正确”的方式。。</description>
		<content:encoded><![CDATA[<p>我现在遇到了完全一样的状况，写了2个月才发现自己片面地理解了Model，以为Model只是用来做数据表的增删改查，于是所有的业务逻辑都放到了Controller，现在每个Controller都是几千行。。。</p>
<p>意识到问题的严重，通过搜索来到这里。请教博主后来是怎样重构的？做成Component放到components目录下，似乎可行，只是我还不太理解正常情况下components是做什么的。。直接继承AR类放到model目录下？这好像才是“正确”的方式。。</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1964</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Wed, 04 Jan 2012 09:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1964</guid>
		<description>PHP标准时间格式(带毫秒):
&lt;pre&gt;
function mytime(){
	$t = microtime(true);
	$d = substr(sprintf(&#039;%03d&#039;, ($t - intval($t)) * 1000), 0, 3);
	$str = date(&quot;Y-m-d H:i:s,$d&quot;, $t);
	return $str;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>PHP标准时间格式(带毫秒):</p>
<pre>
function mytime(){
	$t = microtime(true);
	$d = substr(sprintf('%03d', ($t - intval($t)) * 1000), 0, 3);
	$str = date(&quot;Y-m-d H:i:s,$d&quot;, $t);
	return $str;
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1963</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Fri, 30 Dec 2011 07:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1963</guid>
		<description>&lt;h3&gt;实现 JSONP 时, 记住千万要对传入的 callback 函数进行正则过滤([0-9a-z]+), 仅仅 htmlspecialchars() 是不够的! 否则会有 JavaScript 注入(XSS)攻击!&lt;/h3&gt;</description>
		<content:encoded><![CDATA[<h3>实现 JSONP 时, 记住千万要对传入的 callback 函数进行正则过滤([0-9a-z]+), 仅仅 htmlspecialchars() 是不够的! 否则会有 JavaScript 注入(XSS)攻击!</h3>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1962</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Fri, 30 Dec 2011 05:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1962</guid>
		<description>vi 里执行 Shell 命令: 1,$!CMD, 如

1,$!sort -k 3</description>
		<content:encoded><![CDATA[<p>vi 里执行 Shell 命令: 1,$!CMD, 如</p>
<p>1,$!sort -k 3</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1961</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Fri, 30 Dec 2011 03:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1961</guid>
		<description>XJad（Java源代码反编译工具） V2.2</description>
		<content:encoded><![CDATA[<p>XJad（Java源代码反编译工具） V2.2</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1960</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Tue, 27 Dec 2011 04:43:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1960</guid>
		<description>PHP的system()会直接echo程序的输出, 而exec()不会.</description>
		<content:encoded><![CDATA[<p>PHP的system()会直接echo程序的输出, 而exec()不会.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1959</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Tue, 27 Dec 2011 02:43:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1959</guid>
		<description>所有 cron 程序都应该输出一个报表通过邮件发出来.</description>
		<content:encoded><![CDATA[<p>所有 cron 程序都应该输出一个报表通过邮件发出来.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1958</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Mon, 26 Dec 2011 11:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1958</guid>
		<description>PHP PCRE 正则表达可以用斜线&quot;/&quot;, 也可以用&quot;@&quot;包起来.</description>
		<content:encoded><![CDATA[<p>PHP PCRE 正则表达可以用斜线&quot;/&quot;, 也可以用&quot;@&quot;包起来.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 简单想法 by ideawu</title>
		<link>http://www.ideawu.net/blog/idea/comment-page-7#comment-1957</link>
		<dc:creator>ideawu</dc:creator>
		<pubDate>Mon, 26 Dec 2011 09:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/%e7%ae%80%e5%8d%95%e6%83%b3%e6%b3%95#comment-1957</guid>
		<description>grep 中的 &quot;+&quot; 要转义, 而且不需要 -e 参数</description>
		<content:encoded><![CDATA[<p>grep 中的 &quot;+&quot; 要转义, 而且不需要 -e 参数</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 史上最强大的PHP Web面试题(会做就能进百度) by 程朝</title>
		<link>http://www.ideawu.net/blog/archives/585.html/comment-page-1#comment-1956</link>
		<dc:creator>程朝</dc:creator>
		<pubDate>Fri, 16 Dec 2011 06:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.ideawu.net/blog/?p=585#comment-1956</guid>
		<description>&lt;?php
header(&#039;content-type:text/html;charset=utf-8;&#039;);
$cats = array(
			    array(
			        &#039;id&#039; =&gt; 1,
			        &#039;name&#039; =&gt; &#039;学术和教育11&#039;,
			        &#039;children&#039; =&gt; array(
			            array(
			                &#039;id&#039; =&gt; 11,
			                &#039;name&#039; =&gt; &#039;自然科学11&#039;,
			                &#039;children&#039; =&gt; array(
				            			array(
							                &#039;id&#039; =&gt; 111,
							                &#039;name&#039; =&gt; &#039;自然科学111&#039;,
							                &#039;children&#039; =&gt; null,
				            			)
						            ),
			            ),
			            array(
			                &#039;id&#039; =&gt; 12,
			                &#039;name&#039; =&gt; &#039;自然科学12&#039;,
			                &#039;children&#039; =&gt; null,
			            ),
			           
			        ),
			    ),
			    array(
			        &#039;id&#039; =&gt; 2,
			        &#039;name&#039; =&gt; &#039;学术和教育222&#039;,
			        &#039;children&#039; =&gt; array(
			            array(
			                &#039;id&#039; =&gt; 21,
			                &#039;name&#039; =&gt; &#039;自然科学21&#039;,
			                &#039;children&#039; =&gt; null,
			            ),
			            array(
			                &#039;id&#039; =&gt; 22,
			                &#039;name&#039; =&gt; &#039;自然科学22&#039;,
			                &#039;children&#039; =&gt; null,
			            ),
			           
			        ),
			    ),
			   array(
			        &#039;id&#039; =&gt; 3,
			        &#039;name&#039; =&gt; &#039;学术和教育33&#039;,
			        &#039;children&#039; =&gt; array(
			            array(
			                &#039;id&#039; =&gt; 31,
			                &#039;name&#039; =&gt; &#039;自然科学31&#039;,
			                &#039;children&#039; =&gt; array(
			            		array(
			            			&#039;id&#039; =&gt; 331,
					                &#039;name&#039; =&gt; &#039;自然科学331&#039;,
					                &#039;children&#039; =&gt; null,
			            		),
			            	),
			            ),
			            array(
			                &#039;id&#039; =&gt; 32,
			                &#039;name&#039; =&gt; &#039;自然科学32&#039;,
			                &#039;children&#039; =&gt; null,
			            ),
			           
			        ),
			    ),
			);
		menu($cats);
		
			
	function menu($cats,$id=NULL)
	{
		if(!empty($id))
		{
			$class=&quot;class=&#039;children&#039;&quot;;
		}
		

		echo&quot;&lt;ul $class&gt;&quot;;
		foreach($cats as $k=&gt;$v)
		{
			echo &quot;&lt;li&gt;$v[name]&quot;;
			
			if($v[&#039;children&#039;]!=NULL)
			{
				menu($v[&#039;children&#039;],$v[&#039;id&#039;]);
			}
			
			echo &quot;&lt;/li&gt;&quot;;
		}
		echo &quot;&lt;/ul&gt;&quot;;
	}
?&gt;

&lt;style&gt;
&lt;!--
ul{ list-style-type:none; }
ul li{cursor :pointer; background: url(&quot;img/1.png&quot;)  no-repeat  0px 6px; padding-left:10px;}
ul li.click{ background: url(&quot;img/2.png&quot;)  no-repeat  0px 6px;}
--&gt;
&lt;/style&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	$(document).ready(function(){
			$(&quot;ul.children&quot;).hide();
			$(&quot;li&quot;).click(function(){
					$(this).addClass(&#039;click&#039;).children(&#039;ul&#039;).show();
				});
		});
&lt;/script&gt;</description>
		<content:encoded><![CDATA[<p>&lt;?php<br />
header(&#8216;content-type:text/html;charset=utf-8;&#8217;);<br />
$cats = array(<br />
			    array(<br />
			        &#8216;id&#8217; =&gt; 1,<br />
			        &#8216;name&#8217; =&gt; &#8216;学术和教育11&#8242;,<br />
			        &#8216;children&#8217; =&gt; array(<br />
			            array(<br />
			                &#8216;id&#8217; =&gt; 11,<br />
			                &#8216;name&#8217; =&gt; &#8216;自然科学11&#8242;,<br />
			                &#8216;children&#8217; =&gt; array(<br />
				            			array(<br />
							                &#8216;id&#8217; =&gt; 111,<br />
							                &#8216;name&#8217; =&gt; &#8216;自然科学111&#8242;,<br />
							                &#8216;children&#8217; =&gt; null,<br />
				            			)<br />
						            ),<br />
			            ),<br />
			            array(<br />
			                &#8216;id&#8217; =&gt; 12,<br />
			                &#8216;name&#8217; =&gt; &#8216;自然科学12&#8242;,<br />
			                &#8216;children&#8217; =&gt; null,<br />
			            ),</p>
<p>			        ),<br />
			    ),<br />
			    array(<br />
			        &#8216;id&#8217; =&gt; 2,<br />
			        &#8216;name&#8217; =&gt; &#8216;学术和教育222&#8242;,<br />
			        &#8216;children&#8217; =&gt; array(<br />
			            array(<br />
			                &#8216;id&#8217; =&gt; 21,<br />
			                &#8216;name&#8217; =&gt; &#8216;自然科学21&#8242;,<br />
			                &#8216;children&#8217; =&gt; null,<br />
			            ),<br />
			            array(<br />
			                &#8216;id&#8217; =&gt; 22,<br />
			                &#8216;name&#8217; =&gt; &#8216;自然科学22&#8242;,<br />
			                &#8216;children&#8217; =&gt; null,<br />
			            ),</p>
<p>			        ),<br />
			    ),<br />
			   array(<br />
			        &#8216;id&#8217; =&gt; 3,<br />
			        &#8216;name&#8217; =&gt; &#8216;学术和教育33&#8242;,<br />
			        &#8216;children&#8217; =&gt; array(<br />
			            array(<br />
			                &#8216;id&#8217; =&gt; 31,<br />
			                &#8216;name&#8217; =&gt; &#8216;自然科学31&#8242;,<br />
			                &#8216;children&#8217; =&gt; array(<br />
			            		array(<br />
			            			&#8216;id&#8217; =&gt; 331,<br />
					                &#8216;name&#8217; =&gt; &#8216;自然科学331&#8242;,<br />
					                &#8216;children&#8217; =&gt; null,<br />
			            		),<br />
			            	),<br />
			            ),<br />
			            array(<br />
			                &#8216;id&#8217; =&gt; 32,<br />
			                &#8216;name&#8217; =&gt; &#8216;自然科学32&#8242;,<br />
			                &#8216;children&#8217; =&gt; null,<br />
			            ),</p>
<p>			        ),<br />
			    ),<br />
			);<br />
		menu($cats);</p>
<p>	function menu($cats,$id=NULL)<br />
	{<br />
		if(!empty($id))<br />
		{<br />
			$class=&quot;class=&#8217;children&#8217;&quot;;<br />
		}</p>
<p>		echo&quot;&lt;ul $class&gt;&quot;;<br />
		foreach($cats as $k=&gt;$v)<br />
		{<br />
			echo &quot;&lt;li&gt;$v[name]&quot;;</p>
<p>			if($v['children']!=NULL)<br />
			{<br />
				menu($v['children'],$v['id']);<br />
			}</p>
<p>			echo &quot;&lt;/li&gt;&quot;;<br />
		}<br />
		echo &quot;&lt;/ul&gt;&quot;;<br />
	}<br />
?&gt;</p>
<p>&lt;style&gt;<br />
&lt;!&#8211;<br />
ul{ list-style-type:none; }<br />
ul li{cursor :pointer; background: url(&quot;img/1.png&quot;)  no-repeat  0px 6px; padding-left:10px;}<br />
ul li.click{ background: url(&quot;img/2.png&quot;)  no-repeat  0px 6px;}<br />
&#8211;&gt;<br />
&lt;/style&gt;<br />
&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&quot;&gt;&lt;/script&gt;<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
	$(document).ready(function(){<br />
			$(&quot;ul.children&quot;).hide();<br />
			$(&quot;li&quot;).click(function(){<br />
					$(this).addClass(&#8216;click&#8217;).children(&#8216;ul&#8217;).show();<br />
				});<br />
		});<br />
&lt;/script&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

