You are here: Re: need to create and make download link for csv « PHP Programming Language « IT news, forums, messages
Re: need to create and make download link for csv

Posted by nephish on 09/19/06 12:15

James McIninch wrote:
> PHP to generate the CSV is probably easiest:
>
> <?php header("Content-Type", "text/csv");
> // code spewing CSV here
> ?>
>
> nephish wrote:
>
> > Hello there,
> >
> > i have an app that i need to be able to publish a link to download a
> > csv file.
> > i know that i can use php to make the file, but how to i link to it
> > through php.
> > like if i have an html file that has a link in it like this
> > <a href="somedata.csv">here be data</a>
> > or would i make that a .php file that would generate a csv ?
> >
> > the data will come from MySQL.
> >
> > any ideas?
> >
> > thanks


i like the code spewing csv bit. But the filename will be a .php, right
? Will the browser the client uses recognize that it is producing a csv
for them to download? You know, with the little [save as] dialog?

thanks
shawn

 

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

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