On Thu, 23 Aug 2001 10:06, Casteele/ShadowLord wrote:
> Andy <[EMAIL PROTECTED]> wrote in article
> <003b01c12b23$d1f245d0$0b01a8c0@ANDreY>...
>
> > See if is there some kind of echo before header()s, or HTML sent to
> > browser.
>
> No, I've been extremely careful to avoid that. The following are the
> two test files I've been using to try to solve this.. (sans the
> ---------- File Begin/End ----------)
>
> lib.php:
> ---------- File Begin ----------
> <?php
> function do_nothing() {}
> ?>
> ---------- File End ----------
>
> test.php
> ---------- File Begin ----------
> <?php
> include_once("lib.php");
> if( headers_sent ) {
> $senthdrs = "Headers Sent";
> } else {
> $senthdrs = "Headers not sent";
> }
> ?><html>
> <head><title>PHP Lib Test</title></head>
> <body><h1>PHP Lib Test</h1><hr>
> <?php
> echo( $senthdrs );
> ?></body>
> </html>
> ---------- File End ----------
>
> End result:
> PHP Lib Test
> ------------------------------------------------------------
> Headers sent
>
>
> From what I can tell from the documentation and through
> experimentation, either there's additional headers being generated when
> php includes the content (a content-type header maybe?) or more likely,
> after php is done parsing the file and 'removing' the code, it comes
> back as a single CRLF, which triggers Apache/PHP to send the headers.
> Actually, that setup makes sense to me, but I'm trying to find out if
> there is a way around it.
>
> Thanx
> Cas
Check your included file for _ANY_ blank lines outside the <?php tags.
That will be enough to trigger the problem.
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
How long will a floating point operation float?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]