Re: headers already sent
| From: | pete M | Date: | Wed, 14 Apr 2004 16:49:36 +0000 |
| Subject: | Re: headers already sent | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33881@lists.php.net to get a copy of this message | ||
make susre that the <?php does not have any whitespace before it.. caught me out on a few ocassions - eg in an include file as trailing spaces
pete
Matthew Perry wrote:
When I insert the following header:
header ("Content-type: application/vnd.ms-excel");
header ("Content-Disposition: attachment" );
I get the messages:
*Warning*: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\trial.php:2) in *C:\Program Files\Apache Group\Apache2\htdocs\trial.php* on line *3*
*Warning*: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\trial.php:2) in *C:\Program Files\Apache Group\Apache2\htdocs\trial.php* on line *4
*I get similar messages when I use my web host. How do I use these headers correctly?
Matt