<?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; PHP调试</title>
	<atom:link href="https://www.phppan.com/tag/php%e8%b0%83%e8%af%95/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.phppan.com</link>
	<description>SaaS SaaS架构 团队管理 技术管理 技术架构 PHP 内核 扩展 项目管理</description>
	<lastBuildDate>Sat, 25 Apr 2026 00:56:17 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>PHP页面仅输出了一部分内容的原因：程序报错</title>
		<link>https://www.phppan.com/2010/07/php-part-program-error/</link>
		<comments>https://www.phppan.com/2010/07/php-part-program-error/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 01:04:31 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP应用]]></category>
		<category><![CDATA[PHP调试]]></category>

		<guid isPermaLink="false">http://www.phppan.com/?p=831</guid>
		<description><![CDATA[上周，vsgeping跟我讨论一个问题，关于PHP页面在显示时，仅显示了一部分，一开始我以为是缓冲的问题，即内 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>上周，vsgeping跟我讨论一个问题，关于PHP页面在显示时，仅显示了一部分，一开始我以为是缓冲的问题，即内容被写到stdout后，没有输出到浏览器。纠结了许久<br />
然后在周末时，忽然想起前段时间由于json版本的问题也导致了类似情况的出现，于是怀疑是程序在那个点就停止了，或者说是报错了，程序由于关闭了报错，于是就没有了内容。<br />
<strong>有代码，有真相</strong><br />
看如下的一个例子<br />
【PHP报错终止仅显示报错前内容的示例】</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">错误之前的内容
错误之后的内容</pre></td></tr></table></div>

<p>可以看到程序输出：</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">错误之前的内容
Fatal error<span style="color: #339933;">:</span> Call to undefined <span style="color: #000000; font-weight: bold;">function</span> json<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> in</pre></td></tr></table></div>

<p>上面的程序由于调用了未定义的函数导致报错<br />
如果此时我们去掉error_reporting(E_ALL)<br />
那我们会看到程序仅输出：</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">错误之前的内容</pre></td></tr></table></div>

<p><strong>在此感谢vsgeping</strong></p>
]]></content:encoded>
			<wfw:commentRss>https://www.phppan.com/2010/07/php-part-program-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
