Re: XmlHttpRequest not loading latest version of xml
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: XmlHttpRequest not loading latest version of xml

From: Thomas 'PointedEars' Lahn <PointedEars@web.de>
Date: Wed Nov 30 2005 - 20:56:25 CET

Randy Webb wrote:

> Thomas 'PointedEars' Lahn said the following on 11/29/2005 9:54 AM:
>> [in PHP, header() only works if there was no previous output.]
>
> Not entirely true.

,-<URL:http://php.net/manual/en/function.header.php>
|
| Remember that header() 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 include(), or require(), functions,
| or another file access function, and have spaces or empty lines that are
| output before header() is called. The same problem exists when using a
| single PHP/HTML file.

Maybe you are referring to this:

| <?php
| header("HTTP/1.0 404 Not Found");
| ?>
|
| Note: The HTTP status header line will always be the first sent to the
| client, regardless of the actual header() call being the first or not.
| [...]

However, additional header() calls, including sending issueing HTTP status
headers do not qualify as "(actual) output" here.

X-Post & F'up2 comp.lang.php

PointedEars
Received on Sat Dec 3 04:33:54 2005