Re: Sending the results of a query without using a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Todd Cary wrote:
Some shared servers do not allow the creation of a file, so I am looking for a way to take the results of a query (MySQL), create a CSV output and have it in a sendable format for the user without creating a file.


are you sure, then how could you say ftp the files to the server, are you not trying to create files in the wrong directory?

hmm if you want to allow the user to download the file, then just send the correct headers, using the header() function, for the csv format and then echo the contents of the file.

remember your application may spit out some other bits of text and this will interfere with sending the headers so you may also need to look at the output control functions to clean the outout buffer and then send your headers and data:
http://www.php.net/manual/en/ref.outcontrol.php

Regards,

Clive.

{No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux