Re: sending headers
| From: | Paul Chvostek | Date: | Mon, 23 Jun 2003 15:13:06 +0000 |
| Subject: | Re: sending headers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-152507@lists.php.net to get a copy of this message | ||
On Mon, Jun 23, 2003 at 04:26:40PM +0200, Petre Agenbag wrote:
>
> I am having trouble using headers.
>
> I try to include a redirect header in my script, but is fails with the
> familiar ( headers already sent) error.
>
> I KNOW you should put the headers call where it will cause the first
> output, and I do that, the only thing happening infront of the headers
> call is an include statement to my main db class; this class has
> absolutely NO output unless a function is called (which it is not)...
>
> What am I missing?
I assume your database inclusion script is spitting out something you
didn't intend it to. It could be as simple as an extra blank line after
your closing '?>'.
To find out what's going on, use a command line like:
curl -D- http://hostname/path/to/script.php |
more
Assuming you have curl installed of course. If not, try looking at your
script output through http://samspade.org/t/safe .
--
Paul Chvostek <paul@it.ca>
it.canada http://www.it.ca/
Free PHP web hosting! http://www.it.ca/web/