You are here: Re: Output as csv « PHP Programming Language « IT news, forums, messages
Re: Output as csv

Posted by Geoff Berrow on 03/12/06 19:02

Message-ID: <44142622$0$47027$edfadb0f@dread15.news.tele.dk> from Bent
Stigsen contained the following:

>There is a rfc stating "text/csv" as the mime-type, but it is quite
>recent, so probably not widely recognized.
>http://www.rfc-archive.org/getrfc.php?rfc=4180
>
>Presently, I think the common way is to set disposition to attachment
>and supply a filename, and let the OS figure out how to open it.
>header('Content-Disposition: attachment; filename="foo.csv"');

Thanks.

I have found that this gives an option to open or dave the file,
however, opening it does not work.

But the following seems to work fine.

header("Content-Type: text/csv");
header("Content-Disposition: inline; filename=$_SESSION[table].csv ");

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

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

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