<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[TNF : Tatter Network Foundation forum - 플러그인 출력 버퍼링 문제]]></title>
		<link>http://forum.tattersite.com/ko/viewtopic.php?id=3350</link>
		<description><![CDATA[플러그인 출력 버퍼링 문제 의 최근 RSS 글들.]]></description>
		<lastBuildDate>Sat, 30 Jun 2007 05:30:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[RSS 답글: 플러그인 출력 버퍼링 문제]]></title>
			<link>http://forum.tattersite.com/ko/viewtopic.php?pid=18866#p18866</link>
			<description><![CDATA[<p>현재의 인터페이스상 플러그인이 잘 flush를 해 줘야 하는 수 밖에는요.</p><p>에러 상황을 좀더 명확히 보고할 수 있도록 인터페이스를 고쳤으면 하는데 -ㅅ-</p>]]></description>
			<author><![CDATA[null@example.com (gendoh)]]></author>
			<pubDate>Sat, 30 Jun 2007 05:30:21 +0000</pubDate>
			<guid>http://forum.tattersite.com/ko/viewtopic.php?pid=18866#p18866</guid>
		</item>
		<item>
			<title><![CDATA[플러그인 출력 버퍼링 문제]]></title>
			<link>http://forum.tattersite.com/ko/viewtopic.php?pid=18863#p18863</link>
			<description><![CDATA[<p><a href="http://forum.tattersite.com/ko/viewtopic.php?id=2397">http://forum.tattersite.com/ko/viewtopic.php?id=2397</a> 이런 경우에 해당하는 문제인데요..</p><p>/blog/plugin/index.php 에 보면</p><div class="codebox"><pre><code>fireEvent($suri[&#039;directive&#039;] . &#039;/&#039; . $suri[&#039;value&#039;]);
if (!headers_sent())
    respondNotFoundPage();</code></pre></div><p>이렇게 돼있어서 플러그인이 실행된 후 출력되는 양이 작아서 아직 버퍼에 묻혀있는 상태일때는 플러그인이 실행되지 않은걸로 간주돼 not found 페이지만 보여지게 됩니다</p><p>그래서 플러그인에서 짧은 내용을 출력해야 되는 경우에는 항상 flush()를 해줘야되는 귀찮음이 있죠..</p><p>PHP 버퍼에 출력해야될 내용(header가 아닌 content)이 남아있는지 확인할 수 있는 방법이 있으면 해결될 문제같은데 이걸 체크할 수 있는 방법이 없는것 같아서..</p><p>차선책으로는</p><div class="codebox"><pre><code>ob_start();
fireEvent($suri[&#039;directive&#039;] . &#039;/&#039; . $suri[&#039;value&#039;]);
$content = ob_get_clean();
if ($content == &#039;&#039;)
    respondNotFoundPage();
echo $content;</code></pre></div><p>이런식으로 해도 될 것 같습니다</p><p>더 좋은 방법이 없을까요?</p>]]></description>
			<author><![CDATA[null@example.com (crizin)]]></author>
			<pubDate>Sat, 30 Jun 2007 03:30:38 +0000</pubDate>
			<guid>http://forum.tattersite.com/ko/viewtopic.php?pid=18863#p18863</guid>
		</item>
	</channel>
</rss>
