<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to detect if headers are already sent in PHP</title>
	<atom:link href="http://blogs.vinuthomas.com/2006/10/06/how-to-detect-if-headers-are-already-sent-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.vinuthomas.com/2006/10/06/how-to-detect-if-headers-are-already-sent-in-php/</link>
	<description>A Tech Discovery Blog on PHP, Ajax, Security and Social Media.</description>
	<lastBuildDate>Thu, 13 Oct 2011 13:51:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: hammertscrew</title>
		<link>http://blogs.vinuthomas.com/2006/10/06/how-to-detect-if-headers-are-already-sent-in-php/comment-page-1/#comment-31758</link>
		<dc:creator>hammertscrew</dc:creator>
		<pubDate>Tue, 22 Jan 2008 15:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.vinuthomas.com/2006/10/06/how-to-detect-if-headers-are-already-sent-in-php/#comment-31758</guid>
		<description>better:

function safeRedirect($url) {
   if(headers_sent()) {
      echo &quot;Please go to &lt;a href=&#039;&quot;.$url.&quot;&#039; rel=&quot;nofollow&quot;&gt;&quot;.$url.&quot;&lt;/a&gt;&quot;;
      echo &quot;\n&quot;;
         echo &quot;window.location.href=&#039;&quot;.$url.&quot;&#039;;\n&quot;;
      echo &quot;\n&quot;;
      echo &quot;\n&quot;;
      echo &quot;\n&quot;;
   }
   else{
      header(&#039;Location: &#039;.$url);
   }

   exit;
}

Don&#039;t forget the closing &#039;exit&#039;, otherwise the script will continue executing.</description>
		<content:encoded><![CDATA[<p>better:</p>
<p>function safeRedirect($url) {<br />
   if(headers_sent()) {<br />
      echo &#8220;Please go to <a href='".$url."' rel="nofollow">&#8220;.$url.&#8221;</a>&#8220;;<br />
      echo &#8220;\n&#8221;;<br />
         echo &#8220;window.location.href=&#8217;&#8221;.$url.&#8221;&#8216;;\n&#8221;;<br />
      echo &#8220;\n&#8221;;<br />
      echo &#8220;\n&#8221;;<br />
      echo &#8220;\n&#8221;;<br />
   }<br />
   else{<br />
      header(&#8216;Location: &#8216;.$url);<br />
   }</p>
<p>   exit;<br />
}</p>
<p>Don&#8217;t forget the closing &#8216;exit&#8217;, otherwise the script will continue executing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 250/251 objects using disk: basic

Served from: blogs.vinuthomas.com @ 2012-02-09 04:39:52 -->
