<?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>晓狼窝</title>
	<atom:link href="http://www.xiaolangspace.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xiaolangspace.com</link>
	<description>我的技术小窝</description>
	<lastBuildDate>Tue, 13 Mar 2012 09:22:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux文件权限详解</title>
		<link>http://www.xiaolangspace.com/archives/124</link>
		<comments>http://www.xiaolangspace.com/archives/124#comments</comments>
		<pubDate>Tue, 13 Mar 2012 09:21:59 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=124</guid>
		<description><![CDATA[Linux文件权限详解]]></description>
			<content:encoded><![CDATA[<p>在linux中 通过 &#8220;ls -l&#8221;查看文件详情时，我们可以看到:</p>

<div class="wp_codebox"><table><tr id="p1241"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p124code1"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">-</span>rw<span style="color: #339933;">-</span>r<span style="color: #339933;">--</span>r<span style="color: #339933;">--</span>  <span style="color: #cc66cc;">1</span> root  root   <span style="color: #cc66cc;">2059307</span> <span style="color: #cc66cc;">2012</span><span style="color: #339933;">-</span><span style="color: #208080;">01</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">10</span> <span style="color: #cc66cc;">15</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">31</span> test<span style="color: #339933;">.</span>zip</pre></td></tr></table></div>

<p>这些信息是test.zip文件的详细信息。<br />
其中</p>

<div class="wp_codebox"><table><tr id="p1242"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p124code2"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">-</span>rw<span style="color: #339933;">-</span>r<span style="color: #339933;">--</span>r<span style="color: #339933;">--</span></pre></td></tr></table></div>

<p>表示test.zip的文件权限，具体如下：<br />
1.第一个字符表示文件的类型，&#8221;-&#8221; 表示文件类型，&#8221;d&#8221;表示文件夹类型，&#8221;l&#8221;表示链接文件<br />
2.从第二个字符开始，每三个字符为一组，表示不同用户对该文件读写权限。其中第一组（也就是第2-4个字符）表示文件所有者对该文件的读写权限；第二组（第5-7个字符），表示文件所有者所在用户组的用户对该文件的读写权限；第三组（第8-10个字符）表示除去前两组表示的用户外的其他用户对该文件的读写权限。每组中的三个字符，从左到右，第一个字符表示是否有可读权限，有的话用&#8221;r&#8221;表示，没有的话用&#8221;-&#8221;表示；第二个字符表示是否有可写权限，有的话用&#8221;w&#8221;表示，没有的话用&#8221;-&#8221;；第三个字符表示是否有可执行权限，有的话为&#8221;x&#8221;，没有的话用&#8221;-&#8221;表示。</p>
<p>如果需要修改文件权限的话，可以通过chmod 命令实现,例如：</p>

<div class="wp_codebox"><table><tr id="p1243"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p124code3"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">chmod</span> <span style="color: #cc66cc;">777</span> test<span style="color: #339933;">.</span>zip</pre></td></tr></table></div>

<p>其中，777中三个数字分别对应上述三种用户的权限，<br />
每种权限对应一个值：<br />
r权限：有的话为4，没有的话为0<br />
w权限：有的话为2，没有的话为0<br />
x权限：有的话为1，没有的话为0<br />
因此，777这三个数字分别是三中用户第该文件的权限的和，<br />
例如，某用户对test.zip文件有可读可写，但没有可执行权限的话，那对应的数字就是6(也就是4+2+0)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/124/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP得到昨天0时的UNIX时间戳</title>
		<link>http://www.xiaolangspace.com/archives/121</link>
		<comments>http://www.xiaolangspace.com/archives/121#comments</comments>
		<pubDate>Wed, 18 Jan 2012 07:43:43 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=121</guid>
		<description><![CDATA[得到昨天0时的UNIX时间戳的代码]]></description>
			<content:encoded><![CDATA[<p>    得到昨天0时的UNIX时间戳的代码：</p>

<div class="wp_codebox"><table><tr id="p1214"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p121code4"><pre class="php" style="font-family:monospace;">    <span style="color: #666666; font-style: italic;">//获取昨天0点整的uinx时间戳</span>
    <span style="color: #000088;">$yestday</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y-m-d'</span><span style="color: #339933;">,</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' 00:00:00'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$yestday</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/121/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>常用Linux命令总结</title>
		<link>http://www.xiaolangspace.com/archives/118</link>
		<comments>http://www.xiaolangspace.com/archives/118#comments</comments>
		<pubDate>Tue, 10 Jan 2012 13:34:48 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=118</guid>
		<description><![CDATA[常用Linux命令总结]]></description>
			<content:encoded><![CDATA[<p>1.mv<br />
说明：移动文件<br />
范例：mv file1 file2<br />
注解：file1：源文件<br />
        file2：目标文件或目标目录</p>
<p>2.cp<br />
说明：复制文件<br />
范例：cp file1 file2<br />
注解：file1：源文件<br />
        file2：目标目录</p>
<p>3.rm<br />
说明：删除文件或目录<br />
范例：rm -rf  file1<br />
注解：-rf ：以循环方式删除文件夹中的文件<br />
        file1 ：文件或目录（范例中的为目录）<br />
4.chmod<br />
说明：修改文件权限<br />
范例：chmod +x file1<br />
注解：+x：为文件添加可执行权限，此参数也可为数字表示的权限，例如：0777<br />
        file1：需要修改权限的文件</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/118/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP以下载方式打开txt文档</title>
		<link>http://www.xiaolangspace.com/archives/113</link>
		<comments>http://www.xiaolangspace.com/archives/113#comments</comments>
		<pubDate>Wed, 04 Jan 2012 09:02:49 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=113</guid>
		<description><![CDATA[PHP以下载方式打开txt文档]]></description>
			<content:encoded><![CDATA[<p>    如果用路径的方式直接打开一个txt 文档，会在浏览器中显示这个文档所有的内容，<br />
例如，使用路径：http://localhost/test.txt,就会在浏览器中打印出test.txt中的所有内容。<br />
如果想要打开http://localhost/test.txt时，下载test.txt文件，可以通过执行php程序，使用header()函数，模拟http请求，就可以下载txt文档了，代码如下：</p>

<div class="wp_codebox"><table><tr id="p1135"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p113code5"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
        <span style="color: #666666; font-style: italic;">//下载sql文档</span>
        <span style="color: #000088;">$fullFilePatch</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;/test.txt&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: application/force-download&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Disposition: attachment; filename=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fullFilePatch</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">readfile</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fullFilePatch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/113/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>网线水晶头排线规则</title>
		<link>http://www.xiaolangspace.com/archives/111</link>
		<comments>http://www.xiaolangspace.com/archives/111#comments</comments>
		<pubDate>Sat, 31 Dec 2011 06:51:44 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[杂项]]></category>
		<category><![CDATA[水晶头]]></category>
		<category><![CDATA[网线]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=111</guid>
		<description><![CDATA[以网线卡口为反面，相反方向为正面，网线排线从左往右依次为：
橙白->橙->绿白->蓝->蓝白->绿->灰白->灰
]]></description>
			<content:encoded><![CDATA[<p>以网线卡口为反面，相反方向为正面，网线排线从左往右依次为：<br />
橙白->橙->绿白->蓝->蓝白->绿->灰白->灰</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/111/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL中的时间函数</title>
		<link>http://www.xiaolangspace.com/archives/107</link>
		<comments>http://www.xiaolangspace.com/archives/107#comments</comments>
		<pubDate>Fri, 30 Dec 2011 07:54:26 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[sql]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=107</guid>
		<description><![CDATA[1.UNIX_TIMESTAMP
可以将&#8221;Y-m-d H:i:s&#8221;这类时间格式转化成unix时间戳
例如：

1
2
3
SELECT UNIX_TIMESTAMP&#40;'2011-12-30 21:23:00'&#41;
&#160;
--输出1325247780

2.FROM_UNIXTIME
可以将unix时间戳转化为&#8221;Y-m-d H:i:s&#8221;这类时间格式的数据
例如：

1
2
3
SELECT FROM_UNIXTIME&#40;1325347922&#41;
&#160;
--输出&#34;2012-01-01 01:12:02&#34;

]]></description>
			<content:encoded><![CDATA[<p><strong>1.UNIX_TIMESTAMP</strong><br />
可以将&#8221;Y-m-d H:i:s&#8221;这类时间格式转化成unix时间戳<br />
例如：</p>

<div class="wp_codebox"><table><tr id="p1078"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p107code8"><pre class="php" style="font-family:monospace;">SELECT UNIX_TIMESTAMP<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'2011-12-30 21:23:00'</span><span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #339933;">--</span>输出<span style="color: #cc66cc;">1325247780</span></pre></td></tr></table></div>

<p><strong>2.FROM_UNIXTIME</strong><br />
可以将unix时间戳转化为&#8221;Y-m-d H:i:s&#8221;这类时间格式的数据<br />
例如：</p>

<div class="wp_codebox"><table><tr id="p1079"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p107code9"><pre class="php" style="font-family:monospace;">SELECT FROM_UNIXTIME<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1325347922</span><span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #339933;">--</span>输出<span style="color: #0000ff;">&quot;2012-01-01 01:12:02&quot;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/107/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>复制数据库表中的字段</title>
		<link>http://www.xiaolangspace.com/archives/104</link>
		<comments>http://www.xiaolangspace.com/archives/104#comments</comments>
		<pubDate>Fri, 23 Sep 2011 02:45:49 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=104</guid>
		<description><![CDATA[假如有表A和表B两个表，想要将表A中的某几个字段中的内容复制到表B中同名的列中，这时可以使用SQL

1
      insert into A&#40;a,b&#41;select a,cfrom B

]]></description>
			<content:encoded><![CDATA[<p>假如有表A和表B两个表，想要将表A中的某几个字段中的内容复制到表B中同名的列中，这时可以使用SQL</p>

<div class="wp_codebox"><table><tr id="p10411"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p104code11"><pre class="php" style="font-family:monospace;">      insert into A<span style="color: #009900;">&#40;</span>a<span style="color: #339933;">,</span>b<span style="color: #009900;">&#41;</span>select a<span style="color: #339933;">,</span>cfrom B</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/104/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>linux 下PHP安装错误 configure: error: xml2-config not found. Please check your libxml2 installation.</title>
		<link>http://www.xiaolangspace.com/archives/101</link>
		<comments>http://www.xiaolangspace.com/archives/101#comments</comments>
		<pubDate>Tue, 06 Sep 2011 04:50:02 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[centOS，linux]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=101</guid>
		<description><![CDATA[linux 下PHP安装错误 configure: error: xml2-config not found. Please check your libxml2 installation. ]]></description>
			<content:encoded><![CDATA[<p>    在linux下安装PHP 编译后 会报错：configure: error: xml2-config not found. Please check your libxml2 installation.<br />
这个问题 可以安装libxml2来解决，首先下载一个libxml2-2.7.2.tar.gz的包，下载好后，解压libxml2-2.7.2.tar.gz,<br />
进入这个解压包内，执行命令</p>

<div class="wp_codebox"><table><tr id="p10112"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p101code12"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ./configure --prefix=/usr/local/libxml2
</span>
<span style="color: #666666; font-style: italic;"># make
</span>
<span style="color: #666666; font-style: italic;"># make install</span></pre></td></tr></table></div>

<p>最后在安装php即可</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/101/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>centOS安装VIM命令</title>
		<link>http://www.xiaolangspace.com/archives/98</link>
		<comments>http://www.xiaolangspace.com/archives/98#comments</comments>
		<pubDate>Tue, 06 Sep 2011 03:33:09 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[centOS，linux]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=98</guid>
		<description><![CDATA[centOS安装VIM命令]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p9813"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p98code13"><pre class="php" style="font-family:monospace;">yum <span style="color: #339933;">-</span>y install vim<span style="color: #339933;">-</span>enhanced</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/98/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php中检验邮箱格式的两种方法</title>
		<link>http://www.xiaolangspace.com/archives/95</link>
		<comments>http://www.xiaolangspace.com/archives/95#comments</comments>
		<pubDate>Mon, 05 Sep 2011 03:33:15 +0000</pubDate>
		<dc:creator>晓狼</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.xiaolangspace.com/?p=95</guid>
		<description><![CDATA[在php中匹配邮箱格式的两种方法]]></description>
			<content:encoded><![CDATA[<p>1.使用正则表达匹配邮箱字符串<br />
 /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/</p>
<p>2.使用filter_var()函数进行过滤</p>

<div class="wp_codebox"><table><tr id="p9514"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p95code14"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">filter_var</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;someone@example....com&quot;</span><span style="color: #339933;">,</span> FILTER_VALIDATE_EMAIL<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
 <span style="color: #009900;">&#123;</span>
     <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;E-mail is not valid&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//输出E-mail is not valid</span>
 <span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
 <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;E-mail is valid&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
 <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.xiaolangspace.com/archives/95/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

