Browser won't display webpage when headers are sent

[font=arial]
I am completely stumped. This used to work most of the time on most computers.
Now it doesn’t work at all.
Famous phrase “I didn’t change anything”.

My code builds a .csv file that gets sent to the client.

The name of the php file is MailingListPROC.php

My headers look like this:

header(‘Content-Type: application/octet-stream’);
header(‘Cache-Control: no-cache’);
header(‘Pragma: no-cache’);
header(‘Content-Disposition: attachment; filename=“report.csv”’);

Then I go through my loop writing records to the file.

I get the following message:
No webpage was found for the web address: http://www.petfriends.org/basis/MailingListPROC.php

If I comment out the header() statements, the file is written correctly to the browser.

It was working a couple weeks ago, except some people would get this error. Most, however, would get the .csv file just fine.

Can anyone think of a reason this could happen?

[/font]

Sponsor our Newsletter | Privacy Policy | Terms of Service