Re: Attaching File to be Emailed

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

 



benc11@xxxxxxxxx wrote:

> I need to take a word document or pdf file from either a MySQL db or
> from a
> directory, which will then be sent via php script.  How can I go about
> doing
> this?  Can anyone provide sample code or point me in the right direction.
>
Brian Dunning started a thread about nine minutes before you on sending
a file to the browser. "Serving out a file to Firefox ... headers?"
That's pretty much all you need to do to read from a file (adding in
whatever fixes the problem he is experiencing with FireFox of course.)

If you wanted to store the data in a MySQL database it would be the same
procedure, except you would query the database (BLOB column type) and
echo that data instead of using readfile() to get your data.

Travis

-- 
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