<?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://wangtao.name/feed" rel="self" type="application/rss+xml" />
	<link>http://wangtao.name</link>
	<description>王涛的博客，专注于web开发。</description>
	<lastBuildDate>Wed, 01 Sep 2010 00:17:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>防止密集物体恐惧症</title>
		<link>http://wangtao.name/2010/09/01/trypophobia-2.html</link>
		<comments>http://wangtao.name/2010/09/01/trypophobia-2.html#comments</comments>
		<pubDate>Tue, 31 Aug 2010 23:35:11 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[随便说说]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=423</guid>
		<description><![CDATA[前一段时间，李毅吧被爆，爆吧都发了各种恶心图，像空手指、莲蓬乳之类图片。 一看图片，就觉得头发麻，给人一种很恶心的感觉。原因就在于这些图片让人产生“密集物体恐惧症”。 http://baike.baidu.com/view/1821775.htm 大量密集的物体会给大家产生一种压迫感，加上这些图片的颜色，就容易给人的心理上产生不好的联想，引发周身的不舒适感。 在设计网页的布局时，也要考虑到密集物体恐惧症，网站内容不宜过于密集。比如，段落文字的行距啊。]]></description>
			<content:encoded><![CDATA[<p>前一段时间，李毅吧被爆，爆吧都发了各种恶心图，像空手指、莲蓬乳之类图片。</p>
<p>一看图片，就觉得头发麻，给人一种很恶心的感觉。原因就在于这些图片让人产生“密集物体恐惧症”。</p>
<p><a href="http://baike.baidu.com/view/1821775.htm">http://baike.baidu.com/view/1821775.htm</a></p>
<p>大量密集的物体会给大家产生一种压迫感，加上这些图片的颜色，就容易给人的心理上产生不好的联想，引发周身的不舒适感。</p>
<p>在设计网页的布局时，也要考虑到密集物体恐惧症，网站内容不宜过于密集。比如，段落文字的行距啊。</p>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/09/01/trypophobia-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在看《Head First 设计模式》</title>
		<link>http://wangtao.name/2010/08/26/head-first-design-patterns.html</link>
		<comments>http://wangtao.name/2010/08/26/head-first-design-patterns.html#comments</comments>
		<pubDate>Thu, 26 Aug 2010 06:04:47 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[随便说说]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=420</guid>
		<description><![CDATA[刚买到书的那天，本准备回家好好人消化的。 却遇上了加班，一加就是在公司住了三天。 在回家的路上感觉空气真好。。 从昨天开始认真看这本书，里面代码都是简单的JAVA。]]></description>
			<content:encoded><![CDATA[<p>刚买到书的那天，本准备回家好好人消化的。</p>
<p>却遇上了加班，一加就是在公司住了三天。</p>
<p>在回家的路上感觉空气真好。。</p>
<p>从昨天开始认真看这本书，里面代码都是简单的JAVA。</p>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/08/26/head-first-design-patterns.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我用的火狐插件（列表）</title>
		<link>http://wangtao.name/2010/07/10/firefoxplugin.html</link>
		<comments>http://wangtao.name/2010/07/10/firefoxplugin.html#comments</comments>
		<pubDate>Sat, 10 Jul 2010 13:19:26 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[随便说说]]></category>
		<category><![CDATA[火狐插件]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=414</guid>
		<description><![CDATA[我热衷于火狐的一个最大的原因是因为火狐有丰富的插件。虽然安装过多的插件后火狐会占用更多系统资源。像现在我只开了两个网页，内存使用就到170M了。 Adblock plus 一个过滤广告的插件，广告已成往事。 DownloadHelper 下载网站里的视频和图片，我最常用来下载视频，只是现在大多视频网站都把视频分割成一小段一小段的了，下载不便。 DownThemAll! 一个多线程下载插件，可以使用MD5校验文件，中文文件名会乱码。 Extended Copy Menu 扩展浏览器右键复制功能。可能复制为HTML，无格式文本。 Firebug 开发人员必备扩展之一。我一般来用查看html结构，调试CSS，javascript YSlow 基于Firebug性能分析扩展。 FireGestures 鼠标手势。可以自定义手势。 Flagfox 在地址栏显示当前服务器位置的国旗。 NoScript 禁止网站脚本，只允许信任的网站运行脚本。很实用的功能。 Pearl Crescent Page Saver Basic 将网页保存为图片。 ShowIP 显示当前服务器IP地址。满足好奇心。 Xmarks 用于在多个电脑的火狐浏览器之间同步书签。 Zend Studio Toolbar 调试PHP的。]]></description>
			<content:encoded><![CDATA[<p>
我热衷于火狐的一个最大的原因是因为火狐有丰富的插件。虽然安装过多的插件后火狐会占用更多系统资源。像现在我只开了两个网页，内存使用就到170M了。
</p>
<dl>
<dt>Adblock plus</dt>
<dd>一个过滤广告的插件，广告已成往事。</dd>
<dt>DownloadHelper</dt>
<dd>下载网站里的视频和图片，我最常用来下载视频，只是现在大多视频网站都把视频分割成一小段一小段的了，下载不便。</dd>
<dt>DownThemAll!</dt>
<dd>一个多线程下载插件，可以使用MD5校验文件，中文文件名会乱码。</dd>
<dt>Extended Copy Menu</dt>
<dd>扩展浏览器右键复制功能。可能复制为HTML，无格式文本。</dd>
<dt>Firebug</dt>
<dd>开发人员必备扩展之一。我一般来用查看html结构，调试CSS，javascript</dd>
<dt>YSlow</dt>
<dd>基于Firebug性能分析扩展。</dd>
<dt>FireGestures</dt>
<dd>鼠标手势。可以自定义手势。</dd>
<dt>Flagfox</dt>
<dd>在地址栏显示当前服务器位置的国旗。</dd>
<dt>NoScript</dt>
<dd>禁止网站脚本，只允许信任的网站运行脚本。很实用的功能。</dd>
<dt>Pearl Crescent Page Saver Basic</dt>
<dd>将网页保存为图片。</dd>
<dt>ShowIP</dt>
<dd>显示当前服务器IP地址。满足好奇心。</dd>
<dt>Xmarks</dt>
<dd>用于在多个电脑的火狐浏览器之间同步书签。</dd>
<dt>Zend Studio Toolbar</dt>
<dd>调试PHP的。</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/07/10/firefoxplugin.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ipod touch 3越狱成功。</title>
		<link>http://wangtao.name/2010/05/23/ipod-touch-3-crack.html</link>
		<comments>http://wangtao.name/2010/05/23/ipod-touch-3-crack.html#comments</comments>
		<pubDate>Sun, 23 May 2010 03:20:21 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[随便说说]]></category>
		<category><![CDATA[iPod touch]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=398</guid>
		<description><![CDATA[我的Ipod touch 3软件版本为：3.1.3 越狱教程转自http://bbs.weiphone.com/read-htm-tid-772203.html 过程也很简单，无非就是连接ipod，然后运行Spirit Win更新程序。 运行Spirit win更新程序只能提升对ipod底层文件操作的权限，好方便安装.ipa补丁。最终目的就是破解.ipa程序安装限制，方便安装网上下载的盗版程序 然而威峰网的那个教程是要WIFI支持的，没有WIFI但有带无线网卡电脑的童鞋可以使用windows 7 建立一个临时的无线网络。 新建临时网络的教程：http://support.microsoft.com/kb/976507/zh-cn 但是我用windows 7新建无线局域网时，却出现了问题：Ipod能发现新建的网络，并连接成功，但是不能连接到internet 。 解决问题: 一般情况下新建共享 Internet 无线网络最后一步是这样的： 但我设置后却发现找不到&#34;启用Internet连接共享&#34; 这样子是无法共享本地连接的Internet，就算Ipod连接到了新建的网络，还是无法共享本地Internet上网。 于是我查看了我的本地联接信息。打开本地连接，点开属性，在共享选择栏发现了问题： 应该是我共享错误了，让共享的临时网络不能正常连接上无线网。将这两个选项取消，再重新新建共享连接就没问题了。 越狱成功。]]></description>
			<content:encoded><![CDATA[<p>
我的Ipod touch 3软件版本为：3.1.3
</p>
<p>越狱教程转自<a href="http://bbs.weiphone.com/read-htm-tid-772203.html">http://bbs.weiphone.com/read-htm-tid-772203.html</a></p>
<p>过程也很简单，无非就是连接ipod，然后运行Spirit Win更新程序。</p>
<p>运行Spirit win更新程序只能提升对ipod底层文件操作的权限，好方便安装.ipa补丁。最终目的就是破解.ipa程序安装限制，方便安装网上下载的盗版程序</p>
<p>然而威峰网的那个教程是要WIFI支持的，没有WIFI但有带无线网卡电脑的童鞋可以使用windows 7 建立一个临时的无线网络。</p>
<p>新建临时网络的教程：<a href="http://support.microsoft.com/kb/976507/zh-cn">http://support.microsoft.com/kb/976507/zh-cn</a></p>
<p>但是我用windows 7新建无线局域网时，却出现了问题：Ipod能发现新建的网络，并连接成功，但是不能连接到internet 。</p>
<p>解决问题:</p>
<p><span id="more-398"></span></p>
<p>一般情况下新建共享 Internet 无线网络最后一步是这样的：</p>
<p><a href="http://wangtao.name/wp-content/uploads/2010/05/ipod-4png.png"><img src="http://wangtao.name/wp-content/uploads/2010/05/ipod-4png.png" alt="windows 7 设置共享 Internet 无线网络正常情况" title="windows 7 设置共享 Internet 无线网络正常情况" width="628" height="498" class="alignnone size-full wp-image-399" /></a></p>
<p>但我设置后却发现找不到&quot;启用Internet连接共享&quot;
<p><a href="http://wangtao.name/wp-content/uploads/2010/05/ipod-2png.png"><img src="http://wangtao.name/wp-content/uploads/2010/05/ipod-2png.png" alt="Windows 7 快速共享 Internet 无线网络，找不到启用Internet连接共享" title="Windows 7 快速共享 Internet 无线网络，找不到启用Internet连接共享" width="628" height="498" class="alignnone size-full wp-image-400" /></a></p>
<p>这样子是无法共享本地连接的Internet，就算Ipod连接到了新建的网络，还是无法共享本地Internet上网。</p>
<p>于是我查看了我的本地联接信息。打开本地连接，点开属性，在共享选择栏发现了问题：</p>
<p><a href="http://wangtao.name/wp-content/uploads/2010/05/ipod-1png.png"><img src="http://wangtao.name/wp-content/uploads/2010/05/ipod-1png.png" alt="本地连接共享" title="ipod-1png" width="377" height="442" class="alignnone size-full wp-image-401" /></a></p>
<p>应该是我共享错误了，让共享的临时网络不能正常连接上无线网。将这两个选项取消，再重新新建共享连接就没问题了。</p>
<p>越狱成功。</p>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/05/23/ipod-touch-3-crack.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>这是我用Ipod touch发表的文章</title>
		<link>http://wangtao.name/2010/05/21/ipod-touch.html</link>
		<comments>http://wangtao.name/2010/05/21/ipod-touch.html#comments</comments>
		<pubDate>Fri, 21 May 2010 01:16:37 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[随便说说]]></category>
		<category><![CDATA[iPod touch]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=396</guid>
		<description><![CDATA[成功入手一台Ipod touch，甚是兴奋！ Safari在Ipod touch表现出众，对web标准的支持比电脑上的ie还好。]]></description>
			<content:encoded><![CDATA[<p>成功入手一台Ipod touch，甚是兴奋！</p>
<p>Safari在Ipod touch表现出众，对web标准的支持比电脑上的ie还好。</p>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/05/21/ipod-touch.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>哆啦A梦告诉你目前各家浏览器对 CSS3 的支持状况</title>
		<link>http://wangtao.name/2010/05/16/a-browser-css3-support.html</link>
		<comments>http://wangtao.name/2010/05/16/a-browser-css3-support.html#comments</comments>
		<pubDate>Sun, 16 May 2010 11:07:36 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[转载]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=394</guid>
		<description><![CDATA[原文于http://www.cnbeta.com/articles/111225.htm；但例子要翻墙，我特意转载，方便没梯子的童鞋。。 &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.1//EN&#34; &#34;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; &#60;head&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62; &#60;title&#62;哆啦A梦告诉你目前各家浏览器对 CSS3 的支持状况&#60;/title&#62; &#60;style type=&#34;text/css&#34;&#62; body{ background:#fff; } #doraemon{ position:relative; margin:50px; } #head_light{ width:50px; height:50px; transform: rotate(20deg); -webkit-transform: rotate(20deg); -moz-transform: rotate(20deg); -o-transform: rotate(20deg); box-shadow:80px 20px 50px #fff; -webkit-box-shadow:80px 20px 55px #fff; -moz-box-shadow:80px 20px 50px #fff; border-radius:45px; -webkit-border-radius:45px; -moz-border-radius:60px; position:absolute; [...]]]></description>
			<content:encoded><![CDATA[<p>原文于<a href="http://www.cnbeta.com/articles/111225.htm">http://www.cnbeta.com/articles/111225.htm</a>；但例子要翻墙，我特意转载，方便没梯子的童鞋。。</p>
<div class="runcode">
<p><textarea name="runcode" rows="" cols="" class="runcode_text" id="runcode_uCERQh">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;哆啦A梦告诉你目前各家浏览器对 CSS3 的支持状况&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
body{
	background:#fff;
}
#doraemon{
	position:relative;
	margin:50px;
}
#head_light{
	width:50px;
	height:50px;
	transform: rotate(20deg);
		-webkit-transform: rotate(20deg);
		-moz-transform: rotate(20deg);
		-o-transform: rotate(20deg);
	box-shadow:80px 20px 50px #fff;
		-webkit-box-shadow:80px 20px 55px #fff;
		-moz-box-shadow:80px 20px 50px #fff;
	border-radius:45px;
		-webkit-border-radius:45px;
		-moz-border-radius:60px;
	position:absolute;
	top:-20px;
	left:170px;
	opacity:0.5
}
#face{
	position:relative;
	width:310px;
	height:300px;
	border-radius:146px;
		-webkit-border-radius:146px;
		-moz-border-radius:146px;
	background:#07beea;
	background: -webkit-gradient(linear, right top, left bottom, from(#fff) ,color-stop(0.20, #07beea), color-stop(0.73, #10a6ce),color-stop(0.95, #000), to(#444));
	background: -moz-linear-gradient(right top, #fff,#07beea 20%, #10a6ce 73% ,#000 95% ,#000 155%);
	border:#333 2px solid;
	top:-15px;
	box-shadow:-5px 10px 15px rgba(0,0,0,0.45);
		-webkit-box-shadow:-5px 10px 15px rgba(0,0,0,0.45);
		-moz-box-shadow:-5px 10px 15px rgba(0,0,0,0.45);
}
#base{
	position:relative;
	top:-5px;
}
#base_white{
	position:absolute;
	border:#000 2px solid;
	width:264px;
	height:196px;
	border-radius: 150px 150px;
		-webkit-border-radius: 150px 150px;
		-moz-border-radius: 150px 150px;
	background:#FFF;
	background: -webkit-gradient(linear, right top, left bottom, from(#fff),color-stop(0.75,#fff),color-stop(0.83,#eee),color-stop(0.90,#999),color-stop(0.95,#444), to(#000));
	background: -moz-linear-gradient(right top, #fff,#fff 75%, #eee 83%,#999 90%,#444 95%, #000);
	z-index:1;
	top:85px;
	left:22px;
}
#eyes{
	position:relative;
	top:-5px;
}
div.eye{
	position:absolute;
	border-radius: 35px 35px;
		-webkit-border-radius: 35px 35px;
		-moz-border-radius: 35px 35px;
	border:2px solid #000;
	width:72px;
	height:83px;
	z-index:20;
	background:#fff;
}
div.black_eye{
	position:absolute;
	width:15px;
	height:15px;
	border-radius:10px;
		-webkit-border-radius:10px;
		-moz-border-radius:10px;
	background:#333;
	z-index:21;
		-webkit-animation-name: cate;
		-webkit-animation-duration: 10s;
		-webkit-animation-timing-function: linear;
		-webkit-animation-iteration-count: 200;
}
@-webkit-keyframes cate{
	0%{
		margin:0 0 0 0;
	}
	80%	{
		margin:0px 0 0 0;
	}
	85%	{
		margin:-20px 0 0 0;
	}
	90%{
		margin:0 0 0 0;
	}
	93%{
		margin:0 0 0 7px;
	}
	96%{
		margin:0 0 0 0;
	}
	100%{
		margin:0 0 0 0;
	}
}
div.black_left{
	top:100px;
	left:130px;
}
div.black_right{
	top:100px;
	left:170px;
}
div.eye_left{
	top:45px;
	left:82px;
}
div.eye_right{
	top:45px;
	left:156px;
}
#nose{
	width:32px;
	height:32px;
	border:2px solid #000;
	border-radius:50px;
		-webkit-border-radius:50px;
		-moz-border-radius:50px;
	background:#c93e00;
	position:absolute;
	top:117px;
	left:139px;
	z-index:30;
}
#nose_light{
	width:10px;
	height:10px;
	border-radius:5px;
		-webkit-border-radius:5px;
		-moz-border-radius:5px;
	box-shadow:19px 8px 5px #fff;
		-webkit-box-shadow:19px 8px 5px #fff;
		-moz-box-shadow:19px 8px 5px #fff;
	position:relative;
	top:0px;
	left:0px;
}
#nose_line{
	background:#000;
	width:4px;
	height:100px;
	top:125px;
	left:156px;
	position:absolute;
}
#nose_line{
	background:#333;
	width:3px;
	height:100px;
	top:140px;
	left:155px;
	position:absolute;
		z-index:20;
}
#mouth{
	width:240px;
	height:500px;
	border-bottom:3px solid #333;
	border-radius:120px;
		-webkit-border-radius:120px;
		-moz-border-radius:120px;
	position:absolute;
	top:-263px;
	left:36px;
	z-index:10;
}
#mouth_rewrite{
	background:#fff;
	width:240px;
	height:90px;
	position:relative;
	top:115px;
	left:35px;
	z-index:12;
	border-radius:45px;
		-webkit-border-radius:45px;
		-moz-border-radius:60px;
}
#firefox_mouth, x:-moz-broken, x:last-of-type, x:indeterminate {
	position:relative;
	width:170px;
	height:150px;
	-moz-border-radius:85px;
	border:3px solid #000;
	background:#FFF;
	z-index:11;
	top:-3px;
	left:70px;
}
.whiskers{
	background:#333;
	height:2px;
	width:60px;
	position:absolute;
	z-index:20;
}
.whi_right{
	top:165px;
	left:210px;
}
.whi_right_top{
	top:145px;
	left:210px;
}
.whi_right_bottom{
	top:185px;
	left:210px;
}
.whi_left{
	top:165px;
	left:50px;
}
.whi_left_top{
	top:145px;
	left:50px;
}
.whi_left_bottom{
	top:185px;
	left:50px;
}
.rotate20{
	transform: rotate(20deg);
		-webkit-transform: rotate(20deg);
		-moz-transform: rotate(20deg);
		-o-transform: rotate(20deg);
}
.rotate160{
	transform: rotate(160deg);
		-webkit-transform: rotate(160deg);
		-moz-transform: rotate(160deg);
		-o-transform: rotate(160deg);
}
#choker{
	position:relative;
	top:-55px;
	left:35px;
	z-index:100;
}
#belt{
	width:230px;
	height:20px;
	border:#000 solid 2px;
	background:#ca4100;
	background: -webkit-gradient(linear, left top, left bottom, from(#ca4100), to(#800400));
	background: -moz-linear-gradient(top, #ca4100, #800400);
	border-radius:10px;
		-webkit-border-radius:10px;
		-moz-border-radius:10px;
		position:relative;
	left:5px;
}
#bell{
	width:40px;
	height:40px;
	border-radius:50px;
		-webkit-border-radius:50px;
		-moz-border-radius:50px;
	border:2px solid #000;
	background:#f9f12a;
	background: -webkit-gradient(linear, left top, left bottom, from(#f9f12a),color-stop(0.5, #e9e11a), to(#a9a100));
	background: -moz-linear-gradient(top, #f9f12a, #e9e11a 75%,#a9a100);
	box-shadow:-5px 5px 10px rgba(0,0,0,0.25);
		-webkit-box-shadow:-5px 3px 5px rgba(0,0,0,0.25);
		-moz-box-shadow:-5px 5px 10px rgba(0,0,0,0.25);
	position:relative;
	top:-15px;
	left:100px;
}
#bell_line{
	width:36px;
	height:2px;
	background:#f9f12a;
	border:#333 solid 2px;
	position:relative;
	top:10px;
}
#bell_circle{
	width:12px;
	height:10px;
	border-radius:5px;
		-webkit-border-radius:5px;
		-moz-border-radius:5px;
	background:#000;
	position:relative;
	top:14px;
	left:14px;
}
#bell_under{
	width:3px;
	height:15px;
	background:#000;
	position:relative;
	top:10px;
	left:18px;
}
#bell_light{
	width:10px;
	height:10px;
	border-radius:10px;
		-webkit-border-radius:10px;
		-moz-border-radius:10px;
	box-shadow:19px 8px 5px #fff;
		-webkit-box-shadow:19px 8px 5px #fff;
		-moz-box-shadow:19px 8px 5px #fff;
	position:relative;
	opacity:0.7;
	top:-35px;
	left:5px;
}
#doutai{
	position:absolute;
	width:220px;
	height:165px;
	background:#07beea;
	background: -webkit-gradient(linear, right top, left top, from(#07beea),color-stop(0.5, #0073b3),color-stop(0.75,#00b0e0), to(#0096be));
	background: -moz-linear-gradient(right, #07beea, #0073b3 50%,#0096be 75%,#00b0e0 ,#0096be 100% ,#333 114%);
	border:#333 2px solid;
	top:262px;
	left:46px;
}
div.base_white2{
	position:absolute;
	width:170px;
	height:170px;
	border-radius:85px;
		-webkit-border-radius:85px;
		-moz-border-radius:85px;
	border:2px solid #000;
	background:#FFF;
	background: -webkit-gradient(linear, right top, left bottom, from(#fff),color-stop(0.75,#fff),color-stop(0.83,#eee),color-stop(0.90,#999),color-stop(0.95,#444), to(#000));
	background: -moz-linear-gradient(right top, #fff,#fff 75%, #eee 83%,#999 90%,#444 95%, #000);
}
.doutai_center{
	top:230px;
	left:72px;
}
#circle{
	position:relative;
	width:130px;
	height:130px;
	border-radius:65px;
		-webkit-border-radius:65px;
		-moz-border-radius:65px;
	background:#fff;
	background: -webkit-gradient(linear, right top, left bottom, from(#fff),color-stop(0.70,#fff),color-stop(0.75,#f8f8f8),color-stop(0.80,#eee),color-stop(0.88,#ddd), to(#fff));
	background: -moz-linear-gradient(right top, #fff, #fff 70%,#f8f8f8 75%,#eee 80%,#ddd 88% , #fff);
	border:2px solid #000;
	top:-120px;
	left:92px;
}
#circle_rewrite{
	position:relative;
	width:134px;
	height:60px;
	background:#fff;
	border-bottom:2px solid #000;
	top:-250px;
	left:92px;
}
#hand_right{
	position:absolute;
	top:272px;
	left:248px;
	width:100px;
	height:100px;
}
#arm_right{
	position:relative;
	width:80px;
	height:50px;
	background:#07beea;
	background: -webkit-gradient(linear, left top, left bottom, from(#07beea),color-stop(0.85,#07beea), to(#555));
	background: -moz-linear-gradient(top, #07beea, #07beea 85%, #555);
	border:solid 1px #000;
	z-index:-1;
	top:17px;
	transform: rotate(35deg);
		-webkit-transform: rotate(35deg);
		-moz-transform: rotate(35deg);
		-o-transform: rotate(35deg);
	box-shadow:-10px 7px 10px rgba(0,0,0,0.35);
		-webkit-box-shadow:-10px 7px 10px rgba(0,0,0,0.35);
		-moz-box-shadow:-10px 7px 10px rgba(0,0,0,0.35);
}
#hand_left{
	position:absolute;
	top:272px;
	left:-46px;
	width:100px;
	height:100px;
}
#arm_left{
	position:relative;
	width:80px;
	height:50px;
	background:#0096be;
	border:solid 1px #000;
	z-index:-1;
	top:17px;
	left:36px;
	transform: rotate(145deg);
		-webkit-transform: rotate(145deg);
		-moz-transform: rotate(145deg);
		-o-transform: rotate(145deg);
	box-shadow:5px -7px 10px rgba(0,0,0,0.25);
		-webkit-box-shadow:5px -7px 10px rgba(0,0,0,0.25);
		-moz-box-shadow:5px -7px 10px rgba(0,0,0,0.25);
}
div.hand_circle{
	position:absolute;
	width:60px;
	height:60px;
	border-radius:30px;
		-webkit-border-radius:30px;
		-moz-border-radius:30px;
	border:2px solid #000;
	background:#fff;
	background: -webkit-gradient(linear, right top, left bottom, from(#fff),color-stop(0.5,#fff),color-stop(0.70,#eee),color-stop(0.8,#ddd), to(#999));
	background: -moz-linear-gradient(right top, #fff, #fff 50%, #eee 70%, #ddd 80%,#999);
}
.hand_right{
	top:32px;
	left:40px;
}
.arm_rewrite_right{
	position:relative;
	width:4px;
	height:45px;
	background:#07beea;
	top:-51px;
	left:18px;
}
.hand_left{
	top:34px;
	left:10px;
}
.arm_rewrite_left{
	position:relative;
	width:4px;
	height:50px;
	background:#0096be;
	top:-52px;
	left:92px;
}
#foot{
	position:relative;
	width:280px;
	height:40px;
	top:-141px;
	left:20px;
}
#foot_left{
	width:125px;
	height:30px;
	background:#fff;
	background: -webkit-gradient(linear, right top, left bottom, from(#fff),color-stop(0.75,#fff),color-stop(0.85,#eee), to(#999));
	background: -moz-linear-gradient(right top, #fff,#fff 75%, #eee 85%, #999);
	border:solid 2px #333;
	border-top-left-radius:80px;
	border-bottom-left-radius:40px;
	border-top-right-radius:60px;
	border-bottom-right-radius:60px;
		-webkit-border-top-left-radius:80px;
		-webkit-border-bottom-left-radius:40px;
		-webkit-border-top-right-radius:60px;
		-webkit-border-bottom-right-radius:60px;
		-moz-border-radius-topleft:80px;
		-moz-border-radius-bottomleft:40px;
		-moz-border-radius-topright:60px;
		-moz-border-radius-bottomright:60px;
	position:relative;
	left:8px;
	top:2px;
	box-shadow:-6px 0px 10px rgba(0,0,0,0.35);
		-webkit-box-shadow:-6px 0px 10px rgba(0,0,0,0.35);
		-moz-box-shadow:-6px 0px 10px rgba(0,0,0,0.35);
	z-index:-1;
}
#foot_right{
	position:relative;
	width:125px;
	height:30px;
	background:#fff;
	background: -webkit-gradient(linear, right top, left bottom, from(#fff),color-stop(0.75,#fff),color-stop(0.85,#eee), to(#999));
	background: -moz-linear-gradient(right top, #fff,#fff 75%, #eee 85%, #999);
	border:solid 2px #333;
	border-top-left-radius:60px;
	border-bottom-left-radius:60px;
	border-top-right-radius:80px;
	border-bottom-right-radius:40px;
		-webkit-border-top-left-radius:60px;
		-webkit-border-bottom-left-radius:60px;
		-webkit-border-top-right-radius:80px;
		-webkit-border-bottom-right-radius:40px;
		-moz-border-radius-topleft:60px;
		-moz-border-radius-bottomleft:60px;
		-moz-border-radius-topright:80px;
		-moz-border-radius-bottomright:40px;
	top:-32px;
	left:141px;
	box-shadow:-6px 0px 10px rgba(0,0,0,0.35);
		-webkit-box-shadow:-6px 0px 10px rgba(0,0,0,0.35);
		-moz-box-shadow:-6px 0px 10px rgba(0,0,0,0.35);
	z-index:-1;
}
#foot_rewrite{
	position:relative;
	width:20px;
	height:10px;
	background:#fff;
	background: -webkit-gradient(linear, right top, left bottom, from(#666),color-stop(0.83,#fff), to(#fff));
	background: -moz-linear-gradient(right top, #666, #fff 83%, #fff);
	top:-76px;
	left:127px;
	border-top:2px solid #000;
	border-right:2px solid #000;
	border-left:2px solid #000;
	border-top-right-radius:40px;
	border-top-left-radius:40px;
		-webkit-border-top-right-radius:40px;
		-webkit-border-top-left-radius:40px;
		-moz-border-radius-topleft:40px;
		-moz-border-radius-topright:40px;
}
#shadow_doutai_left{
	width:30px;
	height:200px;
	box-shadow:-10px 10px 15px rgba(0,0,0,0.45);
		-webkit-box-shadow:-10px 10px 15px rgba(0,0,0,0.45);
		-moz-box-shadow:-10px 10px 15px rgba(0,0,0,0.45);
	position:absolute;
	top:250px;
	left:46px;
	z-index:-10;
}
#shadow_doutai_right{
	width:30px;
	height:200px;
	box-shadow:10px 10px 15px rgba(0,0,0,0.35);
		-webkit-box-shadow:10px 10px 25px rgba(0,0,0,0.35);
		-moz-box-shadow:10px 10px 15px rgba(0,0,0,0.35);
	position:absolute;
	top:240px;
	left:230px;
	z-index:-10;
}
#shadow_doutai_arm{
	width:85px;
	height:165px;
	box-shadow:-100px 10px 15px rgba(0,0,0,0.0);
		-webkit-box-shadow:-100px 10px 15px rgba(0,0,0,0.25);
		-moz-box-shadow:-100px 10px 15px rgba(0,0,0,0.25);
	position:absolute;
	top:230px;
	left:113px;
	z-index:10;
	opacity:0.5;
	transform: rotate(-20deg);
		-webkit-transform: rotate(-20deg);
		-moz-transform: rotate(-20deg);
		-o-transform: rotate(-20deg);
	border-bottom-left-radius:40px;
		-webkit-border-bottom-left-radius:40px;
		-moz-border-radius-bottomleft:40px;
	border-top-left-radius:20px;
		-webkit-border-top-left-radius:20px;
		-moz-border-radius-topleft:20px;
}
#shadow_belt{
	width:40px;
	height:30px;
	box-shadow:-100px 10px 15px rgba(0,0,0,0);
		-webkit-box-shadow:-100px 10px 15px rgba(0,0,0,0.25);
		-moz-box-shadow:-100px 10px 15px rgba(0,0,0,0.25);
	position:absolute;
	top:240px;
	left:130px;
	z-index:10;
	border-bottom-left-radius:40px;
		-webkit-border-bottom-left-radius:40px;
		-moz-border-radius-bottomleft:40px;
	z-index:300;
}
#arm_left:not(\*|*), .arm_rewrite_left:not(\*|*){
	background:#07beea;
}
#arm_left, .arm_rewrite_left{
	background:#07beea\9;
	*background:#07beea;
	_background:#07beea;
}
#kiji{
	position:relative;
	top:-150px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;doraemon&quot;&gt;
	&lt;div id=&quot;face&quot;&gt;
    	&lt;div id=&quot;head_light&quot;&gt;&lt;/div&gt;
    	&lt;div id=&quot;eyes&quot;&gt;
    	&lt;div class=&quot;eye eye_left&quot;&gt;&lt;/div&gt;
        	&lt;div class=&quot;black_eye black_left&quot;&gt;&lt;/div&gt;
      	&lt;div class=&quot;eye eye_right&quot;&gt;&lt;/div&gt;
        	&lt;div class=&quot;black_eye black_right&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;div id=&quot;base&quot;&gt;
			&lt;div id=&quot;base_white&quot;&gt;&lt;/div&gt;
				&lt;div id=&quot;nose&quot;&gt;
					&lt;div id=&quot;nose_light&quot;&gt;&lt;/div&gt;
				&lt;/div&gt;
                &lt;div id=&quot;nose_line&quot;&gt;&lt;/div&gt;
                &lt;div id=&quot;mouth&quot;&gt;&lt;/div&gt;
                &lt;div id=&quot;mouth_rewrite&quot;&gt;&lt;/div&gt;
                &lt;div id=&quot;firefox_mouth&quot;&gt;&lt;/div&gt;
				&lt;div class=&quot;whiskers whi_right_top rotate160&quot;&gt;&lt;/div&gt;
				&lt;div class=&quot;whiskers whi_right&quot;&gt;&lt;/div&gt;
				&lt;div class=&quot;whiskers whi_right_bottom rotate20&quot;&gt;&lt;/div&gt;
				&lt;div class=&quot;whiskers whi_left_top rotate20&quot;&gt;&lt;/div&gt;
				&lt;div class=&quot;whiskers whi_left&quot;&gt;&lt;/div&gt;
				&lt;div class=&quot;whiskers whi_left_bottom rotate160&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
	&lt;/div&gt;
    &lt;div id=&quot;choker&quot;&gt;
    	&lt;div id=&quot;belt&quot;&gt;&lt;/div&gt;
    	&lt;div id=&quot;bell&quot;&gt;
       	  &lt;div id=&quot;bell_line&quot;&gt;&lt;/div&gt;
            &lt;div id=&quot;bell_circle&quot;&gt;&lt;/div&gt;
            &lt;div id=&quot;bell_under&quot;&gt;&lt;/div&gt;
		&lt;div id=&quot;bell_light&quot;&gt;&lt;/div&gt;
		&lt;/div&gt;
    &lt;/div&gt;
	&lt;div id=&quot;body&quot;&gt;
    &lt;div id=&quot;doutai&quot;&gt;&lt;/div&gt;
		&lt;div class=&quot;base_white2 doutai_center&quot;&gt;&lt;/div&gt;
        		&lt;div id=&quot;pocket&quot;&gt;
                	&lt;div id=&quot;circle&quot;&gt;&lt;/div&gt;
                    &lt;div id=&quot;circle_rewrite&quot;&gt;&lt;/div&gt;
                &lt;/div&gt;
	&lt;/div&gt;
	&lt;div id=&quot;hand_right&quot;&gt;
    	&lt;div id=&quot;arm_right&quot;&gt;&lt;/div&gt;
		&lt;div class=&quot;hand_circle hand_right&quot;&gt;&lt;/div&gt;
		&lt;div class=&quot;arm_rewrite_right&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
	&lt;div id=&quot;hand_left&quot;&gt;
    	&lt;div id=&quot;arm_left&quot;&gt;&lt;/div&gt;
		&lt;div class=&quot;hand_circle hand_left&quot;&gt;&lt;/div&gt;
	  &lt;div class=&quot;arm_rewrite_left&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
	&lt;div id=&quot;foot&quot;&gt;
    	&lt;div id=&quot;foot_left&quot;&gt;&lt;/div&gt;
        &lt;div id=&quot;foot_right&quot;&gt;&lt;/div&gt;
        &lt;div id=&quot;foot_rewrite&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
    	&lt;div id=&quot;shadow_doutai_arm&quot;&gt;&lt;/div&gt;
    	&lt;div id=&quot;shadow_doutai_left&quot;&gt;&lt;/div&gt;
    	&lt;div id=&quot;shadow_doutai_right&quot;&gt;&lt;/div&gt;
        &lt;div id=&quot;shadow_belt&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_uCERQh');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_uCERQh');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/05/16/a-browser-css3-support.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>写了个PHP文件上传类</title>
		<link>http://wangtao.name/2010/05/06/php_file_upload.html</link>
		<comments>http://wangtao.name/2010/05/06/php_file_upload.html#comments</comments>
		<pubDate>Thu, 06 May 2010 07:19:07 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[PHP文件上传类]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=384</guid>
		<description><![CDATA[写了个简单的文件上传类，能同时上传多个文件。 下面是类 &#60;?php /* * 文件上传 * site:http://wangtao.name */ class&#160;uploadFile { &#160; &#160; private&#160;$files = array(); &#160; &#160; private&#160;$uplodName = ''; &#160; &#160; private&#160;$folder = ''; &#160; &#160; function&#160;__construct($files,$uplodName='',$folder = '') &#160; &#160; { &#160; &#160; &#160; &#160; $j = 0; &#160; &#160; &#160; &#160; foreach($files['name']&#160;as $value) &#160; &#160; &#160; &#160; { &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>写了个简单的文件上传类，能同时上传多个文件。</p>
<p>下面是类</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Blue;">&lt;?php</span></li>
<li><span style="color: #ffa500;">/*</span></li>
<li><span style="color: #ffa500;"> * 文件上传</span></li>
<li><span style="color: #ffa500;"> * site:</span><span style="color: Blue;">http://wangtao.name</span></li>
<li><span style="color: #ffa500;"> */</span></li>
<li><span style="color: Green;">class</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">uploadFile</span></li>
<li><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">private</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$files</span><span style="color: Gray;"> = </span><span style="color: Green;">array</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">private</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$uplodName</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">private</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$folder</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">__construct</span><span style="color: Olive;">(</span><span style="color: #00008b;">$files</span><span style="color: Gray;">,</span><span style="color: #00008b;">$uplodName</span><span style="color: Gray;">=</span><span style="color: #8b0000;">''</span><span style="color: Gray;">,</span><span style="color: #00008b;">$folder</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$j</span><span style="color: Gray;"> = </span><span style="color: Maroon;">0</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">foreach</span><span style="color: Olive;">(</span><span style="color: #00008b;">$files</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">name</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">as</span><span style="color: Gray;"> </span><span style="color: #00008b;">$value</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$newFiles</span><span style="color: Olive;">[</span><span style="color: #00008b;">$value</span><span style="color: Olive;">]</span><span style="color: Gray;"> = </span><span style="color: Green;">array</span><span style="color: Olive;">(</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">name</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> =&gt; </span><span style="color: #00008b;">$files</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">name</span><span style="color: #8b0000;">'</span><span style="color: Olive;">][</span><span style="color: #00008b;">$j</span><span style="color: Olive;">]</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">type</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> =&gt; </span><span style="color: #00008b;">$files</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">name</span><span style="color: #8b0000;">'</span><span style="color: Olive;">][</span><span style="color: #00008b;">$j</span><span style="color: Olive;">]</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">tmp_name</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> =&gt; </span><span style="color: #00008b;">$files</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">tmp_name</span><span style="color: #8b0000;">'</span><span style="color: Olive;">][</span><span style="color: #00008b;">$j</span><span style="color: Olive;">]</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">error</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> =&gt; </span><span style="color: #00008b;">$files</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">error</span><span style="color: #8b0000;">'</span><span style="color: Olive;">][</span><span style="color: #00008b;">$j</span><span style="color: Olive;">]</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">size</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> =&gt; </span><span style="color: #00008b;">$files</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">size</span><span style="color: #8b0000;">'</span><span style="color: Olive;">][</span><span style="color: #00008b;">$j</span><span style="color: Olive;">]</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$j</span><span style="color: Gray;"> ++;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$this</span><span style="color: Gray;">-&gt; </span><span style="color: Blue;">files</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$newFiles</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$this</span><span style="color: Gray;">-&gt; </span><span style="color: Blue;">uplodName</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$uplodName</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$this</span><span style="color: Gray;">-&gt; </span><span style="color: Blue;">folder</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$folder</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #ffa500;">/*</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * 保存文件</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; */</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">saveFiles</span><span style="color: Olive;">()</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: Green;">empty</span><span style="color: Olive;">(</span><span style="color: #00008b;">$this</span><span style="color: Gray;"> -&gt; </span><span style="color: Blue;">files</span><span style="color: Olive;">))</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">array</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$fileInfo</span><span style="color: Gray;"> = </span><span style="color: Green;">array</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">foreach</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$this</span><span style="color: Gray;"> -&gt; </span><span style="color: Blue;">files</span><span style="color: Gray;"> </span><span style="color: Green;">as</span><span style="color: Gray;"> </span><span style="color: #00008b;">$file</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$fileInfo</span><span style="color: Olive;">[]</span><span style="color: Gray;"> = </span><span style="color: Blue;">self</span><span style="color: Gray;">::</span><span style="color: Blue;">file</span><span style="color: Olive;">(</span><span style="color: #00008b;">$file</span><span style="color: Gray;">,</span><span style="color: #00008b;">$this</span><span style="color: Gray;"> -&gt; </span><span style="color: Blue;">uplodName</span><span style="color: Gray;"> ,</span><span style="color: #00008b;">$this</span><span style="color: Gray;"> -&gt; </span><span style="color: Blue;">folder</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$fileInfo</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #ffa500;">/*</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * 传入一个文件数组；</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * 上传文件成功后返回数组；</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * $file: 从浏览器中获得的文件数组</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * $uplodName：为保存到文件名，默认为空</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * $folder: 上传后保存的目录，默认为空</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; */</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">static</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">function</span><span style="color: Gray;"> </span><span style="color: Blue;">file</span><span style="color: Olive;">(</span><span style="color: #00008b;">$file</span><span style="color: Gray;">, </span><span style="color: #00008b;">$uplodName</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Gray;">, </span><span style="color: #00008b;">$folder</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #ffa500;">#判断文件数组是否正确</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: #00008b;">$file</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">error</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;"> &gt; </span><span style="color: Maroon;">0</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">echo</span><span style="color: Gray;">&nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">Error: </span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: #00008b;">$file</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">error</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #ffa500;">#生成上传后的文件路径</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Green;">empty</span><span style="color: Olive;">(</span><span style="color: #00008b;">$uplodName</span><span style="color: Olive;">))</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$fileName</span><span style="color: Gray;"> = </span><span style="color: Blue;">self</span><span style="color: Gray;">::</span><span style="color: Blue;">createFolder</span><span style="color: Olive;">(</span><span style="color: Blue;">date</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">Y-m</span><span style="color: #8b0000;">'</span><span style="color: Olive;">))</span><span style="color: Gray;"> . </span><span style="color: Blue;">self</span><span style="color: Gray;">::</span><span style="color: Blue;">getFilename</span><span style="color: Olive;">()</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">.</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: Blue;">self</span><span style="color: Gray;">::</span><span style="color: Blue;">getFileSuffixName</span><span style="color: Olive;">(</span><span style="color: #00008b;">$file</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">name</span><span style="color: #8b0000;">'</span><span style="color: Olive;">])</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$fileName</span><span style="color: Gray;"> = </span><span style="color: Blue;">self</span><span style="color: Gray;">::</span><span style="color: Blue;">createFolder</span><span style="color: Olive;">(</span><span style="color: #00008b;">$folder</span><span style="color: Olive;">)</span><span style="color: Gray;"> . </span><span style="color: #00008b;">$uplodName</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">.</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: Blue;">self</span><span style="color: Gray;">::</span><span style="color: Blue;">fileAdorn</span><span style="color: Olive;">(</span><span style="color: #00008b;">$file</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">name</span><span style="color: #8b0000;">'</span><span style="color: Olive;">])</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Blue;">file_exists</span><span style="color: Olive;">(</span><span style="color: #00008b;">$fileName</span><span style="color: Olive;">))</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">echo</span><span style="color: Gray;">&nbsp; </span><span style="color: #8b0000;">'</span><span style="color: Red;">相同的文件名存在</span><span style="color: #8b0000;">'</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">false</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #ffa500;">#上传成功返回数组</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Blue;">move_uploaded_file</span><span style="color: Olive;">(</span><span style="color: #00008b;">$file</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">tmp_name</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">,</span><span style="color: #00008b;">$fileName</span><span style="color: Olive;">))</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$fileName</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">false</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #ffa500;">#创建目录</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">static</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">private</span><span style="color: Gray;"> </span><span style="color: Green;">function</span><span style="color: Gray;"> </span><span style="color: Blue;">createFolder</span><span style="color: Olive;">(</span><span style="color: #00008b;">$folder</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Green;">empty</span><span style="color: Olive;">(</span><span style="color: #00008b;">$folder</span><span style="color: Olive;">))</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #ffa500;">#默认路径</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$path</span><span style="color: Gray;"> = </span><span style="color: Blue;">date</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">Y-m</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$path</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$folder</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Blue;">file_exists</span><span style="color: Olive;">(</span><span style="color: #00008b;">$path</span><span style="color: Olive;">))</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">mkdir</span><span style="color: Olive;">(</span><span style="color: #00008b;">$path</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">0777</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$path</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">/</span><span style="color: #8b0000;">'</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #ffa500;">/**</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * 获取一个的文件名</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; *</span><span style="color: Blue;"> @param </span><span style="color: #ffa500;">$prefix 文件名的前缀</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; */</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">static</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">function</span><span style="color: Gray;"> </span><span style="color: Blue;">getFilename</span><span style="color: Olive;">(</span><span style="color: #00008b;">$prefix</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$s</span><span style="color: Gray;"> = </span><span style="color: Blue;">explode</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">&nbsp;</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: Blue;">microtime</span><span style="color: Olive;">())</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$s</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$s</span><span style="color: Olive;">[</span><span style="color: Maroon;">1</span><span style="color: Olive;">]</span><span style="color: Gray;">.</span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$s</span><span style="color: Olive;">[</span><span style="color: Maroon;">0</span><span style="color: Olive;">]</span><span style="color: Gray;">,</span><span style="color: Maroon;">2</span><span style="color: Gray;">,-</span><span style="color: Maroon;">1</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$s</span><span style="color: Gray;"> .= </span><span style="color: Blue;">mt_rand</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$prefix</span><span style="color: Gray;">?</span><span style="color: #00008b;">$prefix</span><span style="color: Gray;">.</span><span style="color: #00008b;">$s</span><span style="color: Gray;">:</span><span style="color: #00008b;">$s</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #ffa500;">/*</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * 获得文件后缀</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; * $fileName：文件名</span></li>
<li><span style="color: #ffa500;">&nbsp; &nbsp;&nbsp; */</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">static</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">function</span><span style="color: Gray;"> </span><span style="color: Blue;">getFileSuffixName</span><span style="color: Olive;">(</span><span style="color: #00008b;">$fileName</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$arr</span><span style="color: Gray;"> = </span><span style="color: Blue;">explode</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">.</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: #00008b;">$fileName</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$adorn</span><span style="color: Gray;"> = </span><span style="color: Blue;">array_pop</span><span style="color: Olive;">(</span><span style="color: #00008b;">$arr</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$adorn</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Olive;">}</span></li></ol></div>
</p>
<p>简单的演示</p>
<p><span id="more-384"></span></p>
<h3>index.html</h3>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Olive;">&lt;</span><span style="color: Gray;">!</span><span style="color: #00008b;">DOCTYPE</span><span style="color: Gray;"> </span><span style="color: #00008b;">html</span><span style="color: Gray;"> </span><span style="color: #00008b;">PUBLIC</span><span style="color: Gray;"> </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">-//W3C//DTD XHTML 1.1//EN</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;</span><span style="color: Green;">html</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">xmlns</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://www.w3.org/1999/xhtml</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;</span><span style="color: Green;">head</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;</span><span style="color: Green;">meta</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">http-equiv</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">Content-Type</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">content</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text/html; charset=utf-8</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: Olive;">/&gt;</span></li>
<li><span style="color: Olive;">&lt;</span><span style="color: Green;">title</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">文件上传</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">title</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;/</span><span style="color: Green;">head</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Olive;">&lt;</span><span style="color: Green;">body</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;</span><span style="color: Green;">form</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">action</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">upload.php</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">method</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">post</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">enctype</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">multipart/form-data</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">form1</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">p</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">input</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">file</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">file[]</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: Olive;">/&gt;&lt;/</span><span style="color: Green;">p</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">p</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">input</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">file</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">file[]</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: Olive;">/&gt;&lt;/</span><span style="color: Green;">p</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">p</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">input</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">file</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">file[]</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: Olive;">/&gt;&lt;/</span><span style="color: Green;">p</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">p</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">input</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">submit</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">button</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">button</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">Submit</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: Olive;">/&gt;&lt;/</span><span style="color: Green;">p</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;/</span><span style="color: Green;">form</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;/</span><span style="color: Green;">body</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;/</span><span style="color: Green;">html</span><span style="color: Olive;">&gt;</span></li></ol></div>
<h3>upload.php</h3>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Blue;">&lt;?php</span></li>
<li><span style="color: #00008b;">$files</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$_FILES</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">file</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">;</span></li>
<li><span style="color: #00008b;">$file</span><span style="color: Gray;"> = </span><span style="color: Green;">new</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">uploadFile</span><span style="color: Olive;">(</span><span style="color: #00008b;">$files</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: #00008b;">$arr</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$file</span><span style="color: Gray;"> -&gt; </span><span style="color: Blue;">saveFiles</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">print_r</span><span style="color: Olive;">(</span><span style="color: #00008b;">$arr</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/05/06/php_file_upload.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>分享3颗蒲公英种子</title>
		<link>http://wangtao.name/2010/04/22/t_qq_invite.html</link>
		<comments>http://wangtao.name/2010/04/22/t_qq_invite.html#comments</comments>
		<pubDate>Thu, 22 Apr 2010 08:24:43 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[随便说说]]></category>
		<category><![CDATA[腾讯微博]]></category>
		<category><![CDATA[腾讯微博邀请码]]></category>
		<category><![CDATA[蒲公英种子]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=377</guid>
		<description><![CDATA[等了很久，今天总算是长出蒲公英种子。不食言，分享给大家。 &#8212;&#8212;&#8212;&#8212;&#8211;新增三枚&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; http://t.qq.com/invite/dc3d706532d6c3bf9ac9 http://t.qq.com/invite/b33bca2299bff251b2ab http://t.qq.com/invite/7f92821f3cdbe724d5e7 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- http://t.qq.com/invite/96b343db http://t.qq.com/invite/5658f2ec http://t.qq.com/invite/16adfe6b]]></description>
			<content:encoded><![CDATA[<p>等了很久，今天总算是长出蒲公英种子。不食言，分享给大家。</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;新增三枚&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>http://t.qq.com/invite/dc3d706532d6c3bf9ac9</p>
<p>http://t.qq.com/invite/b33bca2299bff251b2ab</p>
<p>http://t.qq.com/invite/7f92821f3cdbe724d5e7</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>http://t.qq.com/invite/96b343db</p>
<p>http://t.qq.com/invite/5658f2ec</p>
<p>http://t.qq.com/invite/16adfe6b</p>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/04/22/t_qq_invite.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>向遇难同胞默哀</title>
		<link>http://wangtao.name/2010/04/21/4-21.html</link>
		<comments>http://wangtao.name/2010/04/21/4-21.html#comments</comments>
		<pubDate>Wed, 21 Apr 2010 02:03:39 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[随便说说]]></category>
		<category><![CDATA[默哀]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=375</guid>
		<description><![CDATA[刚刚听到鸣笛了。]]></description>
			<content:encoded><![CDATA[<p>刚刚听到鸣笛了。</p>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/04/21/4-21.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>成功开通腾讯微博</title>
		<link>http://wangtao.name/2010/04/13/t_qq.html</link>
		<comments>http://wangtao.name/2010/04/13/t_qq.html#comments</comments>
		<pubDate>Tue, 13 Apr 2010 04:55:54 +0000</pubDate>
		<dc:creator>王涛</dc:creator>
				<category><![CDATA[随便说说]]></category>
		<category><![CDATA[腾讯微博]]></category>

		<guid isPermaLink="false">http://wangtao.name/?p=371</guid>
		<description><![CDATA[获得邀请成功开始了腾讯微博。 目前还不能产生邀请码。 有了我会第一时间发布在本博。 目前腾讯微博没什么特别，没有发现开放的API。强就强在QQ用户多。]]></description>
			<content:encoded><![CDATA[<p>获得邀请成功开始了腾讯微博。</p>
<p>目前还不能产生邀请码。</p>
<p>有了我会第一时间发布在本博。</p>
<p>目前腾讯微博没什么特别，没有发现开放的API。强就强在QQ用户多。</p>
]]></content:encoded>
			<wfw:commentRss>http://wangtao.name/2010/04/13/t_qq.html/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
