Re: How to Force IE to download text file?

From: Date: Sat, 01 May 2010 08:01:30 +0000
Subject: Re: How to Force IE to download text file?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-304804@lists.php.net to get a copy of this message
attachment is correct syntax and solves the problem. Thanks On Fri, Apr 30, 2010 at 9:44 PM, Andre Polykanine <andre@oire.org> wrote: > Hello Ali, > > It's attachment, not attachement. Maybe here's the reason? Just a > thought. > -- > With best regards from Ukraine, > Andre > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org > Yahoo! messenger: andre.polykanine; ICQ: 191749952 > Twitter: m_elensule > > ----- Original message ----- > From: Ali Asghar Toraby Parizy <aliasghar.toraby@gmail.com> > To: php-general@lists.php.net <php-general@lists.php.net> > Date: Friday, April 30, 2010, 7:19:38 PM > Subject: [PHP] How to Force IE to download text file? > > I have written this code to export data to a text file and asks user > to save generated file. It works with Firefox perfectly, but IE shows > content of file instead of prompting the download window. > How can I force IE to show the download dialog? > > <?php > Header("Content-disposition: attachement; filename=data.txt"); > Header("Content-type: text/plain"); > echo $some_data; > ?> > > -- > Ali Asghar Torabi > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Ali Asghar Torabi

« previous php.general (#304804) next »