Discussion: printing to excel
Afficher un message
Vieux 20/07/2007, 21h20   #2
Rik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: printing to excel

On Fri, 20 Jul 2007 22:07:25 +0200, gagal <lynettesmith@gmail.com> wrote:

> I'm beginning to think I'm the queen of it worked before ... I used
> this exact same page on another website I did. It worked
> beautifully. On my site, it doesn't work. Instead of opening in
> excel I get:
> Warning: Cannot modify header information - headers already sent by
> (output started at /home/smith/public_html/addressbook/ab_print.php:6)
> in /home/smith/public_html/addressbook/ab_print.php on line 70
>
> <?PHP include("../includes/connect.txt"); ?>
> <?PHP
> $sql = "SELECT * FROM $db_table4 ORDER BY category ASC, business ASC,

..........
> echo "</TABLE>";
> header("Content-type: application/octet-stream");
> header("Content-Disposition: attachment; filename=addressbook.xls");
> header("Pragma: no-cache");
> header("Expires: 0");
> ?>


Well, on the other server there's obviously some outbut buffering on. Just
move all of your header() statements up and run them first before all
other output or content.
--
Rik Wasmus
  Réponse avec citation
 
Page generated in 0,05355 seconds with 9 queries