Re: Weird/inconsistent behaviour when sending an empty file? (WAMP, Apache2, PHP 4.2.0)
| From: | David Freeman | Date: | Sun, 28 Apr 2002 21:43:04 +0000 |
| Subject: | Re: Weird/inconsistent behaviour when sending an empty file? (WAMP, Apache2, PHP 4.2.0) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95027@lists.php.net to get a copy of this message | ||
On 28 Apr 2002 at 17:54, Moritz Schallaboeck wrote:
> it might very well be an ignorant oversight, but I can't explain the following
> behaviour. Consider a file containing -only- this code:
>
> -snip-
> <?
>
> ?>
> -snip-
[etc]
Just a personal opinion here... if you're sending output to a browser
that is not formatted as a valid web page then you can't rely on what
will work, or not work, for any given browser. IE in particular is
very good at "fixing" broken html as it loads a page and this can
hide otherwise serious problems with html.
If you're going to output something to a browser then you _really_
should make sure it's valid html. At the very least that would mean
including:
<html>
<head></head>
<body></body>
</html>
in a page. What you do after that is up to you. At least if you
include that much you'll get a valid web page and pretty much every
browser will no what to do with it.
CYA, Dave