Re: Help w/ 'headers already sent' and file download

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 15, 2006 10:48 pm, Mike Walsh wrote:
> Is there a way to both display a web page and send content to be saved
> by
> the user?

Not really really, but you can sort of hack it...

> If someone knows of an example I could look at I'd be
> greatful.

Send out the HTML for the stats, and bury a META tag something like:

<META HTTP-EQUIV="REFRESH"
CONTENT="0;http://example.com/cached_results.csv"; />

Course, now you have to work out how to keep the CSV file around long
enough for it to download, and not criss-cross the files and purge
them when they are old and all that...

But it will sort of work like you think you want.

Another option would be to just display the stats and provide a
download link for "right-click" to get the CSV

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux