Reply to Re: Is there a way to redirect to a page that doesn't exit?

Your name:

Reply:


Posted by Mark C on 10/10/29 11:24

> Mark C wrote:
> > I admit the subject is a bit of an oxymoron. Here is what I want to
> > do:
> >
> > I want to build a CSV file in a variable and then redirect the
> > browser to the contents of the variable so the user can download the
> > "file" or open it in Excel. I don't want to create a real file so I
> > can avoid cleaning up files after they are used.
>
>"Janwillem Borleffs" <jw@jwscripts.com>
>
> Just redirect to a file which gathers the data and sends the apprioriate
> headers to the browser to trigger the download dialogue.
>
> Example:
>
> // download.php
> <?php
>
> // Headers to start the download; note that a timestamp is used
> // as the file name to prevent caching
> header('Content-Type: x-download');
> header('Content-Disposition: attachment; filename="' . time() . '.csv"');
>

Yes, but won't this create a file that I will have to clean up. I'm
looking for a way to completely avoid the file.

[Back to original 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

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