ronabop         Sun Feb  4 14:45:17 2001 EDT

  Modified files:              
    /phpdoc/en/functions        http.xml 
  Log:
  Move and enhance note about blank lines and header().
  
Index: phpdoc/en/functions/http.xml
diff -u phpdoc/en/functions/http.xml:1.13 phpdoc/en/functions/http.xml:1.14
--- phpdoc/en/functions/http.xml:1.13   Fri Sep 29 19:01:26 2000
+++ phpdoc/en/functions/http.xml        Sun Feb  4 14:45:17 2001
@@ -25,15 +25,8 @@
     <para>
      The <function>Header</function> function is used at the top of an
      <acronym>HTML</acronym> file to send raw <acronym>HTTP</acronym>
-     header strings.  See the <ulink url="&spec.http1.1;">HTTP 1.1
+     header strings.  See the <ulink url="&spec.http1.1;">HTTP 1.1\
      Specification</ulink> for more information on raw http headers.
-     <emphasis>Note:</emphasis> Remember that the
-     <function>Header</function> function must be called before any
-     actual output is sent either by normal HTML tags or from PHP. It
-     is a very common error to read code with
-     <function>include</function> or with auto_prepend and have spaces
-     or empty lines in this code that force output before
-     <function>header</function> is called.
     </para>
     <para>
      There are two special-case header calls.  The first is the
@@ -79,6 +72,25 @@
       </programlisting>
      </informalexample>
     </para>
+    <para>
+     Remember that the <function>header</function> function must be
+     called before any actual output is sent, either by normal HTML
+     tags blank lines in a file, or from PHP. It is a very common
+     error to read code with <function>include</function>, or
+     <function>require</function>, functions, or another file access
+     function, and have spaces or empty lines that will output before
+     <function>header</function> is called. The same problem exists
+     when using a single PHP/HTML file.
+     <informalexample>
+      <programlisting role="php">
+&lt;?php require("user_logging.inc") ?>
+
+
+&lt;?php header ("Content-Type: audio/x-pn-realaudio"); ?>
+// Broken, Note the blank lines above
+      </programlisting>
+     </informalexample>
+    </para>    
     <para>
      See also <function>headers_sent</function>
     </para>


Reply via email to