You are here: Re: Strategy for creating files and then cleaning up « PHP Programming Language « IT news, forums, messages
Re: Strategy for creating files and then cleaning up

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация