On Tue, 2002-02-12 at 17:57, Erik Price wrote:
> Sorry, I debugged it myself.
> Don't add extra whitespace lines after you jump out of PHP mode (for 
> instance, at the end of an include file, don't have any extra lines 
> after the '?> PHP-jump-out mark'.  The extra lines at the bottom of the 
> functions include file was being interpreted as the end of the headers.  
> (Man that book on HTTP I was reading at the library came in handy! Perl 
> Web Client Programming or something)
> It isn't truly HTML since it isn't between the <html> and </html> tags, 
> but it gets sent along as blank lines in the HTML document.
> That's my theory , anyway.
> Erik

You're right, but just a slight clarification:

Well, PHP isn't an HTML parser and has no concept of a DOM, or the 
SGML-based nature of HTML, or anything like that (although there are
extensions which do this). Essentially, PHP generates a series of bytes,
which are output. In a web environment, this obviously means 'sent to 
the browser', and typically implies HTML output. But you can also output
WML, csv, LDIF, or any other text-based format; or, for that matter,
binary data such as JPEG, GIF, PNG, or whatever. This means that PHP is 
*required* to output whatever it is asked to--regardless of whether it
might look like HTML or not.

Hope this explains it,


 Torben Wilson <[EMAIL PROTECTED]>

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to