<?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>乐趣参与 &#187; 问题</title>
	<atom:link href="http://leqcany.com/tag/%e9%97%ae%e9%a2%98/feed" rel="self" type="application/rss+xml" />
	<link>http://leqcany.com</link>
	<description>年轻、态度、折腾、生活。</description>
	<lastBuildDate>Wed, 09 Jun 2010 13:48:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>遭遇 Warning: Invalid argument supplied for foreach()</title>
		<link>http://leqcany.com/2009/02/php-error.html</link>
		<comments>http://leqcany.com/2009/02/php-error.html#comments</comments>
		<pubDate>Tue, 24 Feb 2009 10:09:29 +0000</pubDate>
		<dc:creator>ZhouGe</dc:creator>
				<category><![CDATA[服务&应用]]></category>
		<category><![CDATA[问题]]></category>

		<guid isPermaLink="false">http://leqcany.com/?p=466</guid>
		<description><![CDATA[&#160;
第一次做动态网站，对于对 PHP 一窍不通的我来说，实在有难度。例如就遭遇了下面这个问题：

当本地测试数据输出时，首页的内容输出能正常显示，但打开单独文章页面时，数据没有读取，在页面最顶端显示：
&#8220; Warning: Invalid argument supplied for foreach() in &#8230;&#8230; &#8221;
问题还在于，在朋友的电脑里不会显示这个错误，数据能正常读取。把文件拷到我电脑里就出现问题了。

朋友一直帮我思考为什么会这样。我也 Google 了一下，大多数都是修改 PHP 语句的。我试着修改了一下，的确可以让其不再显示错误提示，但数据还是读取不了。
又想了一下，按说不应该是代码的问题。只是拷到我电脑后才出现问题的。于是想到本地 PHP 环境的问题，因为我当初安装 WordPress 时而安装了 XAMPP ，而朋友用的是 AppServ 。
于是我将 XAMPP 停止，而后安装了AppServ 。重新测试了一下，问题解决。
这也算一种解决办法吧。
可是，为什么呢？

© ZhouGe for 乐趣参与, 2009. &#124;
Permalink &#124;
One comment &#124;

Post tags: 问题
]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>第一次做动态网站，对于对 PHP 一窍不通的我来说，实在有难度。例如就遭遇了下面这个问题：</p>
<blockquote>
<p>当本地测试数据输出时，首页的内容输出能正常显示，但打开单独文章页面时，数据没有读取，在页面最顶端显示：</p>
<p><span style="color: rgb(255, 0, 0);"><strong>&ldquo; Warning: Invalid argument supplied for foreach() in &hellip;&hellip; &rdquo;</strong></span></p>
<p>问题还在于，在朋友的电脑里不会显示这个错误，数据能正常读取。把文件拷到我电脑里就出现问题了。</p>
</blockquote>
<p>朋友一直帮我思考为什么会这样。我也 Google 了一下，大多数都是修改 PHP 语句的。我试着修改了一下，的确可以让其不再显示错误提示，但数据还是读取不了。</p>
<p>又想了一下，按说不应该是代码的问题。只是拷到我电脑后才出现问题的。于是想到本地 PHP 环境的问题，因为我当初安装 WordPress 时而安装了 <a href="http://www.apachefriends.org/zh_cn/xampp.html">XAMPP</a> ，而朋友用的是<a href="http://www.appservnetwork.com/"> AppServ</a> 。</p>
<p>于是我将 <a href="http://www.apachefriends.org/zh_cn/xampp.html">XAMPP</a> 停止，而后安装了<a href="http://www.appservnetwork.com/">AppServ</a> 。重新测试了一下，问题解决。</p>
<p>这也算一种解决办法吧。</p>
<p>可是，<strong>为什么呢</strong>？</p>
<hr />
<p><small>© ZhouGe for <a href="http://leqcany.com">乐趣参与</a>, 2009. |
<a href="http://leqcany.com/2009/02/php-error.html">Permalink</a> |
<a href="http://leqcany.com/2009/02/php-error.html#comments">One comment</a> |

Post tags: <a href="http://leqcany.com/tag/%e9%97%ae%e9%a2%98" rel="tag">问题</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://leqcany.com/2009/02/php-error.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
