<?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.howareyou.org.cn/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.howareyou.org.cn</link>
	<description>又一个 WordPress 站点</description>
	<lastBuildDate>Thu, 05 May 2011 02:15:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>MYSQL中UNIX时间戳(int)与日期(date)的转换</title>
		<link>http://www.howareyou.org.cn/?p=170</link>
		<comments>http://www.howareyou.org.cn/?p=170#comments</comments>
		<pubDate>Mon, 10 Jan 2011 14:46:48 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[MySQL 日期 时间戳]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=170</guid>
		<description><![CDATA[<p>mysql&#62;&#160;select&#160;FROM_UNIXTIME(1156219870,'%y-%m-%d');<br /><br />mysql&#62;&#160;Select&#160;UNIX_TIMESTAMP('1997-10-04&#160;22:23:00');</p>
 <a href="http://www.howareyou.org.cn/?p=170">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>mysql&gt;&nbsp;select&nbsp;FROM_UNIXTIME(1156219870,&#8217;%y-%m-%d&#8217;);</p>
<p>mysql&gt;&nbsp;Select&nbsp;UNIX_TIMESTAMP(&#8217;1997-10-04&nbsp;22:23:00&#8242;);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=170</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP中URL里使用GET方法传输中文乱码问题的解决方法</title>
		<link>http://www.howareyou.org.cn/?p=169</link>
		<comments>http://www.howareyou.org.cn/?p=169#comments</comments>
		<pubDate>Fri, 07 Jan 2011 10:53:59 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[PHP 乱码 utf8]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=169</guid>
		<description><![CDATA[<p>今天发现在URL中使用GET传输中文时会出现乱码，经搜索得知这是因为PHP的网页中UTF8编码造成的。解决的方法很简单，就是在传输前先使用&#8220;urlencode&#8221;转换一下。比如把原来要转的文字变成： &#60;?php echo urlencode(&#34;汉字汉字&#34;)?&#62;</p>
 <a href="http://www.howareyou.org.cn/?p=169">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>今天发现在URL中使用GET传输中文时会出现乱码，经搜索得知这是因为PHP的网页中UTF8编码造成的。解决的方法很简单，就是在传输前先使用&ldquo;urlencode&rdquo;转换一下。比如把原来要转的文字变成： &lt;?php echo urlencode(&quot;汉字汉字&quot;)?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=169</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP中日期函数用法总结</title>
		<link>http://www.howareyou.org.cn/?p=168</link>
		<comments>http://www.howareyou.org.cn/?p=168#comments</comments>
		<pubDate>Mon, 29 Nov 2010 23:19:01 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[PHP 日期]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=168</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;今天遇到了一些PHP中操作日期的问题，经搜索找到了一些有用的总结，现转下</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;php中对时间日期的处理时相对简单的，php中提供了date/time 函数允许您提取并格式化服务器上的日期和时间。</p><p>&#160;date/time函数的行为受到 php.ini 中设置的影响。当然我们可以手动更改其中的配置项参数，不过最好不要更改。</p>...
 <a href="http://www.howareyou.org.cn/?p=168">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;今天遇到了一些PHP中操作日期的问题，经搜索找到了一些有用的总结，现转下</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;php中对时间日期的处理时相对简单的，php中提供了date/time 函数允许您提取并格式化服务器上的日期和时间。</p>
<p>&nbsp;date/time函数的行为受到 php.ini 中设置的影响。当然我们可以手动更改其中的配置项参数，不过最好不要更改。</p>
<p>&nbsp;php 为我们提供了不少函数来操控时间，虽然多 但用的不多。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;?php<br />/*<br />&nbsp;* Created on 2010-8-20<br />&nbsp;*<br />&nbsp;* @author wangyalei<br />&nbsp;*<br />&nbsp;*/</p>
<p>//1.date() 函数格式化一个本地时间／日期<br />&nbsp;//format 必需。规定如何返回结果。 timestamp 可选。规定时间戳。默认是当前的日期和时间。<br />&nbsp;//date(format,timestamp)<br />&nbsp;<br />&nbsp;//&nbsp; d &#8211; 月中的天 (01-31)<br />&nbsp;//&nbsp;m &#8211; 当前月，以数字计 (01-12)<br />&nbsp;//&nbsp;Y &#8211; 当前的年（四位数）<br />&nbsp;echo date(&quot;Y/m/d&quot;);<br />&nbsp;echo &quot;&lt;br /&gt;&quot;;<br />&nbsp;echo date(&quot;Y.m.d&quot;);<br />&nbsp;echo &quot;&lt;br /&gt;&quot;;<br />&nbsp;echo date(&quot;Y-m-d&quot;);<br />&nbsp;//输出<br />&nbsp;//2010/08/20<br />&nbsp;//2010.08.20<br />&nbsp;//2010-08-20<br />&nbsp;<br />&nbsp;//设置时区<br />&nbsp; date_default_timezone_set(&quot;Asia/Shanghai&quot;);<br />&nbsp; $now = getdate();<br />&nbsp; print &quot;{$now['hours']}:{$now['minutes']}:{$now['seconds']}\t&quot;;//22:13:57<br />&nbsp; $now = localtime();<br />&nbsp; print &quot;$now[2]:$now[1]:$now[0]&quot;;// 22:14:1</p>
<p>//2。mktime() 函数返回一个日期的 Unix 时间戳。</p>
<p>&nbsp; //语法&nbsp; mktime(hour,minute,second,month,day,year,is_dst)<br />&nbsp;<br />&nbsp; //参数可以从右到左依次空着，空着的参数会被设为相应的当前 GMT 值。</p>
<p>&nbsp;&nbsp; $then = mktime(23,31,22,8,21,2010);<br />&nbsp;&nbsp; echo $then;//1282433482　这个就是当前的时间戳<br />&nbsp;&nbsp; echo &quot;&lt;br&gt;&quot;;<br />&nbsp; //把时间戳 转换为正常时间格式<br />&nbsp;&nbsp; echo &quot;day is &quot;.date(&quot;Y/m/d&quot;, $then);//day is 2010/08/21</p>
<p>&nbsp;&nbsp; echo &quot;&lt;br&gt;&quot;;</p>
<p>&nbsp;&nbsp;&nbsp; //获取明天的日期<br />&nbsp;&nbsp;&nbsp; $tomorrow = mktime(0,0,0,date(&quot;m&quot;),date(&quot;d&quot;)+1,date(&quot;Y&quot;));<br />&nbsp;&nbsp;&nbsp; echo &quot;Tomorrow is &quot;.date(&quot;Y/m/d&quot;, $tomorrow);<br />&nbsp;&nbsp;&nbsp;&nbsp; //和mktime 一般差不多<br />&nbsp;&nbsp;&nbsp; echo gmmktime(23,31,22,8,21,2010);//221282433482</p>
<p>//4 strftime() 函数根据区域设置格式化本地时间／日期。<br />&nbsp;&nbsp; //strftime(format,timestamp) format 可选。规定如何返回结果。timestamp 可选。<br />&nbsp;&nbsp;&nbsp; $then = mktime(23,31,22,8,21,2010);<br />&nbsp;&nbsp;&nbsp; print strftime(&quot;%c&quot;,$then);//08/21/10 23:31:22<br />&nbsp;$then = gmmktime(23,31,22,8,21,2010);<br />&nbsp;echo &quot;&lt;br&gt;&quot;;<br />&nbsp;&nbsp;&nbsp; print strftime(&quot;%c&quot;,$then);//08/21/10 23:31:22</p>
<p>&nbsp; // strftime 和 date 相比 更容易生成内部带有插值的时间和日期值的字符串<br />&nbsp;&nbsp;&nbsp; date_default_timezone_set(&quot;Asia/Shanghai&quot;);<br />&nbsp;&nbsp;&nbsp; print strftime(&quot; 现在时间 %I, %P&nbsp; %B %d,%Y&quot;);//现在时间 10, August 22,2010<br />&nbsp;&nbsp;&nbsp; print &quot;现在时间&quot;.date(&#8216;h a &#8216;).date(&#8216;F d,y&#8217;);//现在时间10 am August 22,10</p>
<p>//5计算两个时间差<br />&nbsp;<br />&nbsp;$now_1 = mktime(0,0,0,8,21,2010);<br />&nbsp;$now_2 = mktime(0,0,0,8,22,2010);<br />&nbsp;$diff_seconds = $now_2-$now_1;<br />&nbsp; //相差 的月<br />&nbsp; $diff_week = floor($diff_seconds/604800);//60*60*24*7<br />&nbsp; //相差的天<br />&nbsp; $diff_day = floor($diff_seconds/86400);//60*60*24<br />&nbsp;<br />&nbsp; echo &quot;相差 时间为&quot;.$diff_week.&quot;个月&quot;.$diff_day.&quot;天&quot;;//相差 时间为0个月1天</p>
<p>//6验证日期</p>
<p>//checkdate($month,$day,$year);// return&nbsp; true&nbsp; or false</p>
<p>echo checkdate(2,30,2005) ? &quot;valid&quot; : &quot;invalid&quot;;</p>
<p>//看一个例子</p>
<p>&nbsp;function pc_checkdate($month,$day,$year){<br />&nbsp;<br />&nbsp;<br />&nbsp;&nbsp;$min_age = 18;<br />&nbsp;&nbsp;$max_age = 250;<br />&nbsp;<br />&nbsp;&nbsp;if(!checkdate($month,$day,$year)){<br />&nbsp;&nbsp;&nbsp;return false;<br />&nbsp;&nbsp;}<br />&nbsp;<br />&nbsp;&nbsp;list($this_year,$this_month,$this_day) = explode(&quot;,&quot;,date(&quot;Y,m,d&quot;));<br />&nbsp;&nbsp;$min_year = $this_year &#8211; $max_age;<br />&nbsp;&nbsp;$max_year = $this_year &#8211; $min_age;<br />&nbsp;<br />&nbsp;&nbsp;if(($year&gt;=$min_year)&amp;&amp;($year&lt;=$max_year)){<br />&nbsp;&nbsp;&nbsp;return true;<br />&nbsp;&nbsp;}else{<br />&nbsp;&nbsp;&nbsp;return false;<br />&nbsp;&nbsp;}<br />&nbsp;}<br />&nbsp;<br />&nbsp;if(pc_checkdate(12,3,2001)){<br />&nbsp;<br />&nbsp;&nbsp;print &quot;0k&quot;;<br />&nbsp;}else{<br />&nbsp;<br />&nbsp;&nbsp;print &quot;no&quot;;<br />&nbsp;}</p>
<p>//7 从字符串中解析时间<br />&nbsp;//strtotime() 函数将任何英文文本的日期时间描述解析为 Unix 时间戳。<br />&nbsp;//strtotime(time,now)<br />&nbsp;//time 规定要解析的时间字符串。<br />&nbsp;//now 用来计算返回值的时间戳。如果省略该参数，则使用当前时间。<br />&nbsp;//成功则返回时间戳，否则返回 FALSE。在 PHP 5.1.0 之前本函数在失败时返回 -1。<br />&nbsp;<br />&nbsp;&nbsp;echo(strtotime(&quot;now&quot;));<br />&nbsp;echo &quot;&lt;br&gt;&quot;;<br />&nbsp;echo(strtotime(&quot;3 October 2005&quot;));<br />&nbsp;echo &quot;&lt;br&gt;&quot;;<br />&nbsp;echo(strtotime(&quot;+5 hours&quot;));<br />&nbsp;echo &quot;&lt;br&gt;&quot;;<br />&nbsp;echo(strtotime(&quot;+1 week&quot;));<br />&nbsp;echo &quot;&lt;br&gt;&quot;;<br />&nbsp;echo(strtotime(&quot;+1 week 3 days 7 hours 5 seconds&quot;));<br />&nbsp;echo &quot;&lt;br&gt;&quot;;<br />&nbsp;echo(strtotime(&quot;next Monday&quot;));<br />&nbsp;echo &quot;&lt;br&gt;&quot;;<br />&nbsp;echo(strtotime(&quot;last Sunday&quot;));</p>
<p>//8 使用正侧表达式 解析时间<br />//如果要从字符串中解析时间 你不知道其格式 就不能使用 strtotime</p>
<p>&nbsp;$date = &#8217;2008-12-2 12:30:21&#8242;;<br />&nbsp;preg_match(&#8216;/(\d{4})-(\d{2})-(\d{2})(\d{2}):(\d{2}):(\d{2})/&#8217;,$date,$datearry);</p>
<p>//分割时间</p>
<p>&nbsp;$date_arry=preg_split(&quot;/[-:]/&quot;,$date);<br />&nbsp;var_dump($date_arry);<br />&nbsp;//array(5) {<br />&nbsp;//&nbsp; [0]=&gt;<br />&nbsp;//&nbsp; string(4) &quot;2008&quot;<br />&nbsp;//&nbsp; [1]=&gt;<br />&nbsp;//&nbsp; string(2) &quot;12&quot;<br />&nbsp;//&nbsp; [2]=&gt;<br />&nbsp;//&nbsp; string(4) &quot;2 12&quot;<br />&nbsp;//&nbsp; [3]=&gt;<br />&nbsp;//&nbsp; string(2) &quot;30&quot;<br />&nbsp;//&nbsp; [4]=&gt;<br />&nbsp;//&nbsp; string(2) &quot;21&quot;<br />&nbsp;//}</p>
<p>?&gt;</p>
<p>date&nbsp;&#8211;&nbsp;格式化一个本地时间／日期&nbsp;的 <em>format</em> 字符 在手册中讲解的非常详细了在这就不多废话了</p>
<p>&lt;html&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot;&gt;<br />&lt;title&gt;else if语句的应用&lt;/title&gt;<br />&lt;/head&gt;</p>
<p>&lt;body&gt;<br />&lt;?php<br />&nbsp;$moth = date(&quot;n&quot;);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//设置月份变量$moth<br />&nbsp;$today = date(&quot;j&quot;);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//设置日期变量$today<br />&nbsp;if ($today &gt;= 1 and $today &lt;= 10){&nbsp;&nbsp;&nbsp;//判断日期变量是否在1-10之间<br />&nbsp;&nbsp;echo &quot;今天是&quot;.$moth.&quot;月&quot;.$today.&quot;日上旬&quot;;&nbsp;//如果是，说明是上旬<br />&nbsp;}elseif($today &gt; 10 and $today &lt;= 20){&nbsp;&nbsp;&nbsp;//否则判</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=168</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何用MYSQL查询出某些字符是否包含在字段当中</title>
		<link>http://www.howareyou.org.cn/?p=167</link>
		<comments>http://www.howareyou.org.cn/?p=167#comments</comments>
		<pubDate>Sun, 14 Nov 2010 19:56:44 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[MySQL 查询]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=167</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;最近在做的系统中要实现一个功能，我将多个用户的u_id插入到了document表中的receiver字段中，并以逗号分隔开。在某个功能上要查询出包含有某个用户的documnet记录。之前一直是将这段string取出，分割成数组然后再用数组包含进行判断，相当的麻烦。但是还是能实现功能，可是今天发现在使用分</p>
 <a href="http://www.howareyou.org.cn/?p=167">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最近在做的系统中要实现一个功能，我将多个用户的u_id插入到了document表中的receiver字段中，并以逗号分隔开。在某个功能上要查询出包含有某个用户的documnet记录。之前一直是将这段string取出，分割成数组然后再用数组包含进行判断，相当的麻烦。但是还是能实现功能，可是今天发现在使用分页类时出现了问题，经过查找终于知道MYSQL有一个 <span>FIND_IN_SET函数可以直接查询出需要的记录。</span></p>
<p><span>格式如下：<br />SELECT * FROM `document` WHERE FIND_IN_SET($u_id,`receiver`)</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=167</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>wamp环境中的mysql密码修改</title>
		<link>http://www.howareyou.org.cn/?p=166</link>
		<comments>http://www.howareyou.org.cn/?p=166#comments</comments>
		<pubDate>Sat, 13 Nov 2010 11:33:15 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[wamp MySQL]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=166</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;在wamp环境中修改mysql 的密码需要两步操作：在phpmyadmin的主目录下进入&#8220;权限&#8221;，在打开的页中可以修改各个用户下不同主机的密码，一般选择修改localhost的密码。进入后在&#8220;更改密码&#8221;框中输入新密码 。至此mysql的密码就修改好了。经过</p>
 <a href="http://www.howareyou.org.cn/?p=166">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在wamp环境中修改mysql 的密码需要两步操作：</p>
<ol>
<li>在phpmyadmin的主目录下进入&ldquo;权限&rdquo;，在打开的页中可以修改各个用户下不同主机的密码，一般选择修改localhost的密码。进入后在&ldquo;更改密码&rdquo;框中输入新密码 。至此mysql的密码就修改好了。</li>
<li>经过上步操作后会发现phpmyadmin不能登录了，所以还要对他的配置文件进行密码修改。在wamp\apps\phpmyadmin 文件夹下找到config.inc.php文件 ，<br />    修改$cfg['Server'][$i]['password']的密码值为第一步中的密码即可。</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=166</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google文档果然是部分被和谐了</title>
		<link>http://www.howareyou.org.cn/?p=165</link>
		<comments>http://www.howareyou.org.cn/?p=165#comments</comments>
		<pubDate>Wed, 03 Nov 2010 08:35:15 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[互联网络]]></category>
		<category><![CDATA[google 和谐]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=165</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;今天一早想使用Google在线文档，用来记录一些可能需要随时随地打开的信息，可是居然访问不了。上网搜索后有人给出了这样一个链接：<a href="http://www.google.com/prc/report.html">http://www.google.com/prc/report.html</a>&#160;这上面记录的是<span>谷歌服务在中国大陆的可用性。很悲剧的看到在线文档有部分无法接入。</span></p>...
 <a href="http://www.howareyou.org.cn/?p=165">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;今天一早想使用Google在线文档，用来记录一些可能需要随时随地打开的信息，可是居然访问不了。上网搜索后有人给出了这样一个链接：<a href="http://www.google.com/prc/report.html">http://www.google.com/prc/report.html</a>&nbsp;这上面记录的是<span>谷歌服务在中国大陆的可用性。很悲剧的看到在线文档有部分无法接入。</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=165</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP中UTF8编码的网页要删除中文汉字文件必须进行转换</title>
		<link>http://www.howareyou.org.cn/?p=164</link>
		<comments>http://www.howareyou.org.cn/?p=164#comments</comments>
		<pubDate>Thu, 21 Oct 2010 22:32:31 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[PHP 中文文件 删除 转换]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=164</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;今天做已上传文件的删除时，发现网上找到的例子可以删除（包括中文名），可是一用到我做的系统中时却失效。仔细比对后联想到昨天做上传时的情况，终于发现还是因为编码问题。当我们在UTF8的PHP网页中使用unlink做删除时，必须要把编码先转成gb2312才可以成功删除中文文件。关键代码：&#160;&#160;</p>
 <a href="http://www.howareyou.org.cn/?p=164">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;今天做已上传文件的删除时，发现网上找到的例子可以删除（包括中文名），可是一用到我做的系统中时却失效。仔细比对后联想到昨天做上传时的情况，终于发现还是因为编码问题。当我们在UTF8的PHP网页中使用unlink做删除时，必须要把编码先转成gb2312才可以成功删除中文文件。关键代码：</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconv(&quot;UTF-8&quot;,&quot;gb2312&quot;, $rowfile[att_path] );<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unlink($file);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 另外，在研究中还发现自己犯了一个低级错误，因为在删除的同时把几个表中相关的记录全删掉，所以习惯性的在前面先写好了删除语句，导致后面写的删除文件语句已经找不到相应的记录了。差点酿成大杯具<img src="http://www.howareyou.org.cn/image/face/Shame.gif" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=164</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php多文件上传类(已解决上传中文文件乱码问题)</title>
		<link>http://www.howareyou.org.cn/?p=163</link>
		<comments>http://www.howareyou.org.cn/?p=163#comments</comments>
		<pubDate>Wed, 20 Oct 2010 15:39:51 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[PHP 多文件 上传 乱码 utf8]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=163</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;在网上找到了一个可以用的PHP多文件上传类，经调试比较好用，对上传的文件进行了一些基本的属性判断。但是后来发现传上去的中文文件会出现乱码，搜索后知道可以先将utf8码转成gb2312再移动到指定位置，然后再转回gb2312这样网页中显示的汉字也不会有问题。&#160;&#160;&#160;&#160;</p>
 <a href="http://www.howareyou.org.cn/?p=163">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在网上找到了一个可以用的PHP多文件上传类，经调试比较好用，对上传的文件进行了一些基本的属性判断。但是后来发现传上去的中文文件会出现乱码，搜索后知道可以先将utf8码转成gb2312再移动到指定位置，然后再转回gb2312这样网页中显示的汉字也不会有问题。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 乱码问题关键代码：</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$name=iconv(&quot;UTF-8&quot;,&quot;gb2312&quot;, $name);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move_uploaded_file($tmpname, $this-&gt;final_file_path); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $name=iconv(&quot;gb2312&quot;,&quot;UTF-8&quot;, $name);</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 多文件上传完整代码：</p>
<p>&lt;?php<br />/**//*<br />&nbsp;* @(#)UploadFile.php<br />&nbsp;* <br />&nbsp;* 可同时处理用户多个上传文件。效验文件有效性后存储至指定目录。<br />&nbsp;* 可返回上传文件的相关有用信息供其它程序使用。（如文件名、类型、大小、保存路径）<br />&nbsp;* 使用方法请见本类底部（UploadFile类使用注释）信息。<br />&nbsp;*<br />&nbsp;*/<br />class UploadFile {<br />&nbsp;<br />&nbsp;var $user_post_file = array();&nbsp; //用户上传的文件<br />&nbsp;var $save_file_path;&nbsp;&nbsp;&nbsp; //存放用户上传文件的路径<br />&nbsp;var $max_file_size;&nbsp;&nbsp;&nbsp;&nbsp; //文件最大尺寸<br />&nbsp;var $last_error;&nbsp;&nbsp;&nbsp;&nbsp; //记录最后一次出错信息<br />&nbsp;//默认允许用户上传的文件类型<br />&nbsp;var $allow_type = array(&#8216;gif&#8217;, &#8216;jpg&#8217;, &#8216;png&#8217;, &#8216;zip&#8217;, &#8216;rar&#8217;, &#8216;txt&#8217;, &#8216;doc&#8217;,'xls&#8217;, &#8216;pdf&#8217;);<br />&nbsp;var $final_file_path;&nbsp; //最终保存的文件名<br />&nbsp;var $save_info = array(); //返回一组有用信息，用于提示用户。<br />&nbsp;<br />&nbsp;/**//**<br />&nbsp; * 构造函数，用与初始化相关信息，用户待上传文件、存储路径等<br />&nbsp; *<br />&nbsp; * @param Array $file&nbsp; 用户上传的文件<br />&nbsp; * @param String $path&nbsp; 存储用户上传文件的路径<br />&nbsp; * @param Integer $size 允许用户上传文件的大小(字节)<br />&nbsp; * @param Array $type&nbsp;&nbsp; 此数组中存放允计用户上传的文件类型<br />&nbsp; */<br />&nbsp;function UploadFile($file, $path, $size = 2097152, $type = &#8221;) {<br />&nbsp; $this-&gt;user_post_file = $file;<br />&nbsp; $this-&gt;save_file_path = $path;<br />&nbsp; $this-&gt;max_file_size = $size;&nbsp; //如果用户不填写文件大小，则默认为2M.<br />&nbsp; if ($type != &#8221;)<br />&nbsp;&nbsp; $this-&gt;allow_type = $type;<br />&nbsp;}<br />&nbsp;<br />&nbsp;/**//**<br />&nbsp; * 存储用户上传文件，检验合法性通过后，存储至指定位置。<br />&nbsp; * @access public<br />&nbsp; * @return int&nbsp;&nbsp;&nbsp; 值为0时上传失败，非0表示上传成功的个数。<br />&nbsp; */<br />&nbsp;function upload() {<br />&nbsp; <br />&nbsp; for ($i = 0; $i &lt; count($this-&gt;user_post_file['name']); $i++) {<br />&nbsp;&nbsp; //如果当前文件上传功能，则执行下一步。<br />&nbsp;&nbsp; if ($this-&gt;user_post_file['error'][$i] == 0) {<br />&nbsp;&nbsp;&nbsp; //取当前文件名、临时文件名、大小、扩展名，后面将用到。<br />&nbsp;&nbsp;&nbsp; $name = $this-&gt;user_post_file['name'][$i];<br />&nbsp;&nbsp;&nbsp; //$name=iconv(&quot;UTF-8&quot;,&quot;gb2312&quot;, $name);//为防止上传的中文名乱码，先转成gb2312，最后再转回<br />&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; $tmpname = $this-&gt;user_post_file['tmp_name'][$i];<br />&nbsp;&nbsp;&nbsp; $size = $this-&gt;user_post_file['size'][$i];<br />&nbsp;&nbsp;&nbsp; $mime_type = $this-&gt;user_post_file['type'][$i];<br />&nbsp;&nbsp;&nbsp; $type = $this-&gt;getFileExt($this-&gt;user_post_file['name'][$i]);<br />&nbsp;&nbsp;&nbsp; //检测当前上传文件大小是否合法。<br />&nbsp;&nbsp;&nbsp; if (!$this-&gt;checkSize($size)) {<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;last_error = $name.&quot;超过允许上传的大小&quot;;<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;halt($this-&gt;last_error);<br />&nbsp;&nbsp;&nbsp;&nbsp; continue;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; //检测当前上传文件扩展名是否合法。<br />&nbsp;&nbsp;&nbsp; if (!$this-&gt;checkType($type)) {<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;last_error = $name.&quot;不是允许上传的文件类型&quot;;<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;halt($this-&gt;last_error);<br />&nbsp;&nbsp;&nbsp;&nbsp; continue;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; //检测当前上传文件是否非法提交。<br />&nbsp;&nbsp;&nbsp; if(!is_uploaded_file($tmpname)) {<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;last_error = &quot;Invalid post file method. File name is: &quot;.$name;<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;halt($this-&gt;last_error);<br />&nbsp;&nbsp;&nbsp;&nbsp; continue;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; $name=iconv(&quot;UTF-8&quot;,&quot;gb2312&quot;, $name);<br />&nbsp;&nbsp;&nbsp; //移动文件后，重命名文件用。<br />&nbsp;&nbsp;&nbsp; $basename = $this-&gt;getBaseName($name, &quot;.&quot;.$type);<br />&nbsp;&nbsp;&nbsp; //移动后的文件名<br />&nbsp;&nbsp;&nbsp; $saveas = $basename.&quot;-&quot;.time().rand(100,999).&quot;.&quot;.$type;<br />&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; //组合新文件名再存到指定目录下，格式：存储路径 + 文件名 + 时间 + 扩展名<br />&nbsp;&nbsp;&nbsp; $this-&gt;final_file_path = $this-&gt;save_file_path.&quot;/&quot;.$saveas;<br />&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; if(!move_uploaded_file($tmpname, $this-&gt;final_file_path)) {<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;last_error = $this-&gt;user_post_file['error'][$i];<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;halt($this-&gt;last_error);<br />&nbsp;&nbsp;&nbsp;&nbsp; continue;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; $name=iconv(&quot;gb2312&quot;,&quot;UTF-8&quot;, $name);<br />&nbsp;&nbsp;&nbsp; $saveas=iconv(&quot;gb2312&quot;,&quot;UTF-8&quot;, $saveas);<br />&nbsp;&nbsp;&nbsp; $this-&gt;final_file_path=iconv(&quot;gb2312&quot;,&quot;UTF-8&quot;, $this-&gt;final_file_path);<br />&nbsp;&nbsp;&nbsp; //存储当前文件的有关信息，以便其它程序调用。<br />&nbsp;&nbsp;&nbsp; $this-&gt;save_info[] =&nbsp; array(&quot;name&quot; =&gt; $name, &quot;type&quot; =&gt; $type,&quot;mime_type&quot; =&gt; $mime_type,<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;size&quot; =&gt; $size, &quot;saveas&quot; =&gt; $saveas,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;path&quot; =&gt; $this-&gt;final_file_path);<br />&nbsp;&nbsp; }<br />&nbsp; }<br />&nbsp; return count($this-&gt;save_info); //返回上传成功的文件数目<br />&nbsp;}<br />&nbsp;<br />&nbsp;/**//**<br />&nbsp; * 返回一些有用的信息，以便用于其它地方。<br />&nbsp; * @access public<br />&nbsp; * @return Array 返回最终保存的路径<br />&nbsp; */<br />&nbsp;function getSaveInfo() {<br />&nbsp; return $this-&gt;save_info;<br />&nbsp;}</p>
<p>&nbsp;/**//**<br />&nbsp; * 检测用户提交文件大小是否合法<br />&nbsp; * @param Integer $size 用户上传文件的大小<br />&nbsp; * @access private<br />&nbsp; * @return boolean 如果为true说明大小合法，反之不合法<br />&nbsp; */<br />&nbsp;function checkSize($size) {<br />&nbsp; if ($size &gt; $this-&gt;max_file_size) {<br />&nbsp;&nbsp; return false;<br />&nbsp; }<br />&nbsp; else {<br />&nbsp;&nbsp; return true;<br />&nbsp; }<br />&nbsp;}</p>
<p>&nbsp;/**//**<br />&nbsp; * 检测用户提交文件类型是否合法<br />&nbsp; * @access private<br />&nbsp; * @return boolean 如</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=163</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP无法上传大文件问题</title>
		<link>http://www.howareyou.org.cn/?p=162</link>
		<comments>http://www.howareyou.org.cn/?p=162#comments</comments>
		<pubDate>Tue, 19 Oct 2010 18:33:36 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[PHP 上传]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=162</guid>
		<description><![CDATA[<p>今天研究PHP文件上传时，发现不能成功上传体积比较大的文件。其实只要对php进行一些设置就行了。经过搜索得知主要调整 upload_max_filesize 和 post_max_size 的大小就行了。但网上有一篇更详细的文章：&#160;&#160; 这里额外讲一个错误&#160; 是$_FILES['userfile']['error']检测不到的 就是 当上传文件过大 已经超过PHP设定的</p>
 <a href="http://www.howareyou.org.cn/?p=162">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>今天研究PHP文件上传时，发现不能成功上传体积比较大的文件。其实只要对php进行一些设置就行了。</p>
<p>经过搜索得知主要调整 upload_max_filesize 和 post_max_size 的大小就行了。但网上有一篇更详细的文章：</p>
<p>&nbsp;</p>
<div class="textbox-content">&nbsp; 这里额外讲一个错误&nbsp; 是$_FILES['userfile']['error']检测不到的 就是 当上传文件过大 已经超过PHP设定的 post_max_size 时候 会出现另外一个问题 就是下文中的 会崩溃 ，请大家注意判断</div>
<div class="textbox-content">&nbsp;&nbsp;&nbsp;&nbsp; post_max_size：手册解释<br />设定 POST 数据所允许的最大大小。此设定也影响到文件上传。要上传大文件，该值必须大于 upload_max_filesize。</div>
<div class="textbox-content">
<dd>
<p>如果配置脚本中激活了内存限制，memory_limit 也会影响文件上传。通常说，memory_limit 应该比 post_max_size 要大。</p>
<p>当使用 <strong class="type">integer</strong> 类型时，其值以字节为度量单位。还可以用简化符号，说明见此 FAQ。</p>
<p>如果 POST 数据尺寸大于 post_max_size $_POST 和 $_FILES superglobals 便会为空。这可以以多种方式证明，例如，传递 $_GET 变量到脚本以处理数据， 也就是 &lt;form action=&quot;edit.php?processed=1&quot;&gt;, 然后查看 $_GET['processed'] 是否被设置。</p>
</dd>
</div>
<p>&nbsp;</p>
<div class="textbox-content">php怎么上传大文件 ：</div>
<div class="textbox-content">PHP文件上传的原理及实现<br />利用php的文件函数来实现上传</p>
<p>这段代码分为两个文件，一个为upload.html，一个是upload.php</p>
<p>upload.html<br />&lt;form enctype=&quot;multipart/form-data&quot; action=&quot;upload.php&quot; method=&quot;post&quot;&gt;<br />&lt;input type=&quot;hidden&quot; name=&quot;max_file_size&quot; value=&quot;100000&quot;&gt;<br />&lt;input name=&quot;userfile&quot; type=&quot;file&quot;&gt;　　<br />&lt;input type=&quot;submit&quot; value=&quot;上传文件&quot;&gt;<br />&lt;/form&gt;<br />其中，</p>
<p>请注意&lt;form enctype=&quot;multipart/form-data&quot;&#8230;&#8230;&gt;这是一个标签，我们要实现文件的上传，必须指定为multipart/form-data，否则服务器将不知道要干什么。<br />值得注意的是文件upload.html中表单选项 MAX_FILE_SIZE 的隐藏值域，通过设置其Value(值)可以限制上载文件的大小。<br />MAX_FILE_SIZE  的值只是对浏览器的一个建议，实际上它可以被简单的绕过。因此不要把对浏览器的限制寄希望于该值。实际上，PHP  设置中的上传文件最大值，是不会失效的。但是最好还是在表单中加上  MAX_FILE_SIZE，因为它可以避免用户在花时间等待上传大文件之后才发现该文件太大了的麻烦。<br />upload.php<br />$f=&amp;$HTTP_POST_FILES['Myfile'];<br />$dest_dir=&#8217;uploads&#8217;;//设定上传目录<br />$dest=$dest_dir.&#8217;/&#8217;.date(&quot;ymd&quot;).&quot;_&quot;.$f['name'];//设置文件名为日期加上文件名避免重复<br />$r=move_uploaded_file($f['tmp_name'],$dest);<br />chmod($dest, 0755);//设定上传的文件的属性<br />或者<br />&lt;?copy($_FILES[MyFile][tmp_name],$_FILES[MyFile][name]);?&gt;<br />以上范例中 $_FILES 数组的内容如下所示。我们假设文件上传字段的名称为 userfile（名称可随意命名）</p>
<p>$_FILES['userfile']['name'] 客户端机器文件的原名称。<br />$_FILES['userfile']['type'] 文件的 MIME 类型，需要浏览器提供该信息的支持，例如&ldquo;image/gif&rdquo;。<br />$_FILES['userfile']['size'] 已上传文件的大小，单位为字节。<br />$_FILES['userfile']['tmp_name'] 文件被上传后在服务端储存的临时文件名。<br />$_FILES['userfile']['error'] 和该文件上传相关的错误代码<br />值：0; 没有错误发生，文件上传成功。<br />值：1; 上传的文件超过了 php.ini 中 upload_max_filesize 选项限制的值。<br />值：2; 上传文件的大小超过了 HTML 表单中 MAX_FILE_SIZE 选项指定的值。<br />值：3; 文件只有部分被上传。<br />值：4; 没有文件被上传。<br />[编辑]PHP上传文件涉及到的参数<br />PHP默认的上传限定是最大2M，想上传超过此设定的文件，需要调整PHP、apache等的一些参数. 下面，我们简要介绍一下PHP文件上传涉及到的一些参数：</p>
<p>file_uploads<br />是否允许通过HTTP上传文件的开关，默认为ON即是开</p>
<p>upload_tmp_dir<br />upload_tmp_dir用来说明PHP上传的文件放置的临时目录，要想上传文件，得保证服务器没有关闭临时文件和有对文件夹的写权限，如果未指定则PHP使用系统默认值</p>
<p>upload_max_filesize<br />允许上传文件大小的最大值，默认为2M</p>
<p>post_max_size<br />控制在采用POST方法进行一次表单提交中PHP所能够接收的最大数据量。如果希望使用PHP文件上传功能，则需要将此值改为比upload_max_filesize要大</p>
<p>max_input_time<br />以秒为单位对通过POST、GET以及PUT方式接收数据时间进行限制。如果应用程序所运行环境处在低速链路上，则需要增加此值以适应接收数据所需的更多时间</p>
<p>memory_limit<br />为了避免正在运行的脚本大量使用系统可用内存，PHP允许定义内存使用限额。通过memory_limit变量来指定单个脚本程序可以使用的最大内存容量变量memory_limit的值应当适当大于post_max_size的值</p>
<p>max_execution_time<br />max_execution_time 设置了在强制终止脚本前PHP等待脚本执行完毕的时间，此时间以秒计算。当脚本进入了一个无限循环状态时此变量非常有用。然而，当存在一个需要很长时间完 成的合法活动时（例如上传大型文件），这项功能也会导致操作失败。在这样的情况下必须考虑将此变量值增加，以避免PHP在脚本正在执行某些重要过程的时候 将脚本关闭</p>
<p>对于linux主机，可能在/etc/httpd/conf.d/access.conf/下面里面还有php.conf 文件，这个文件可能会解决一些系统的文件大小限制问题<br />[编辑]利用discuz实现PHP大文件上传应用举例</p>
<p>论坛的附件功能当初设计的初衷并不是为了文件管理，由于服务器配置，php，网络等多方面因素，使得通过论坛上传文件并不是一个好方案。</p>
<p>对于确实需要改善论坛附件上传条件的朋友可以尝试将上面提及的参数在php.ini进行设置，以适应大文件上传的需要。同时别忘记在论坛的后台相应做附件限制的地方进行设置。</p>
<p>论坛主要有2个地方可以对附件上传的大小进行限制，级别从高到低依次为：</p>
<p>帖子相关&#8212;附件类型尺寸<br />用户组&#8212;附件相关<br />同时，下面提供一个配置指导，来源一些成功通过http上传大附件的朋友的提供，当然，由于大家的服务器配置情况以及网络情况不同，并不一定适用你的情况，可能很多地方需要参照修改：</p>
<p>打开php.ini，</p>
<p>参数 &nbsp;设置 &nbsp;说明 &nbsp;<br />file_uploads &nbsp;on &nbsp;是否允许通过HTTP上传文件的开关。默认为ON即是开 &nbsp;<br />upload_tmp_dir &nbsp;&#8211; &nbsp;文件上传至服务器上存储临时文件的地方，如果没指定就会用系统默认的临时文件夹 &nbsp;<br />upload_max_filesize &nbsp;8m &nbsp;望文生意，即允许上传文件大小的最大值。默认为2M &nbsp;<br />post_max_size &nbsp;8m &nbsp;指通过表单POST给PHP的所能接收的最大值，包括表单里的所有值。默认为8M &nbsp;<br />说明 &nbsp;<br />一般地，设置好上述四个参数后，在网络正常的情况下，上传&lt;=8M的文件是不成问题 &nbsp;<br />但如果要上传&gt;8M的大体积文件，只设置上述四项还一定能行的通。除非你的网络真有100M/S的上传高速，否则你还得继续设置下面的参数。 &nbsp;<br />
<br />max_execution_time &nbsp;600 &nbsp;每个PHP页面运行的最大时间值(秒)，默认30秒 &nbsp;<br />max_input_time &nbsp;600 &nbsp;每个PHP页面接收数据所需的最大时间，默认60秒 &nbsp;<br />memory_limit &nbsp;8m &nbsp;每个PHP页面所吃掉的最大内存，默认8M &nbsp;</p>
<p>把上述参数修改后，在网络所允许的正常情况下，就可以上传大体积文件了</p>
<p>[编辑]论坛文件上传常见错误类型（不断总结中&#8230;）<br />Warning: Unable to open &#8216;\\php2&#8242; for reading: Invalid argument in e:\user\web\larksoft.net\upload\upfile.php on line 10<br />是php的upload_tmp_dir的原因，所指定的目录必须可读可写</p>
<p>Parse error: parse error in c:\program files\apache group\apache\htdocs\mdweb\ftpfile\upload.php on line 14<br />Parse error一般都是语句的问题，比如象&ldquo;；&rdquo;，&ldquo;&#8217;&rdquo;，&ldquo;）&rdquo;等等的匹配问题</div>
<div class="textbox-content">
<div style="overflow-x: hidden;" id="post_message_120542">搞定了，是/etc/httpd/conf.d/php.conf里面，有一个<br />&lt;Files *.php&gt;<br />SetOutputFilter PHP<br />SetInputFilter PHP<br />LimitRequestBody 524288<br />&lt;/Files&gt;<br />把LimitRequestBody 改了就可以了。</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=162</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE及FireFox下限制图片大小的CSS解决方法</title>
		<link>http://www.howareyou.org.cn/?p=161</link>
		<comments>http://www.howareyou.org.cn/?p=161#comments</comments>
		<pubDate>Wed, 07 Jul 2010 17:24:46 +0000</pubDate>
		<dc:creator>building</dc:creator>
				<category><![CDATA[网站制作]]></category>
		<category><![CDATA[IE FireFox Css 图片大小]]></category>

		<guid isPermaLink="false">http://www.10n9w.com.cn/?p=161</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;网页中内容部分图片大小经常需要进行限制，动易下采用的是Javascript方法。但随着IE对CSS支持的完善，使用CSS也可以很方便的实现限制。但是IE与FireFox使用的CSS代码完全不同，具体代码如下：<span id="BodyBox"><br /></span></p><p><span id="BodyBox">img<br />{<br />&#160;&#160;&#160; max-width: 200px; <br />...</span></p>
 <a href="http://www.howareyou.org.cn/?p=161">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网页中内容部分图片大小经常需要进行限制，动易下采用的是Javascript方法。但随着IE对CSS支持的完善，使用CSS也可以很方便的实现限制。但是IE与FireFox使用的CSS代码完全不同，具体代码如下：<span id="BodyBox"><br /></span></p>
<p><span id="BodyBox">img<br />{<br />&nbsp;&nbsp;&nbsp; max-width: 200px; <br />&nbsp;&nbsp;&nbsp; width:  expression( ( this.width &gt; 300) ? 300 : this.width ); <br />}</span></p>
<p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第一行是FireFox版的，第二行是IE版的。</span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在具体的使用中还应该注意要把这些CSS使用限制在某个容器中，否则网页中所有的图片都会被如上设置。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howareyou.org.cn/?feed=rss2&#038;p=161</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

