Posted by Alvaro G. Vicario on 07/03/06 22:01
*** laredotornado@zipmail.com escribió/wrote (3 Jul 2006 13:41:15 -0700):
> I want the users to download a file with an ".html" extension. What
> kind of headers would I use to save creating that on a server and have
> that downloaded right to the Desktop (or whereever their default save
> location is)?
header('Content-Type: text/html');
header('Content-Length:' . filesize(........));
header('Content-Disposition: attachment; filename="..........."');
Another option:
header('Content-Type: application/octet-stream');
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Navigation:
[Reply to this message]
|