Re: Upload and Read pdf file
| From: | Richard Lynch | Date: | Fri, 01 Jul 2005 08:13:58 +0000 |
| Subject: | Re: Upload and Read pdf file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217958@lists.php.net to get a copy of this message | ||
On Thu, June 30, 2005 8:53 pm, Bagus Nugroho said:
> is possible to upload pdf file into MySQL database, then read in web
> browser using php?
> And how?
Yes, but...
Yes, it's possible. You'd do it just like the people do images in MySQL.
But, it's probably *WAY* better to just store the PDF in a non web
directory somewhere, and put the PATH in your database.
Then you can just use http://php.net/readfile to spew it out.
Actually, you'll want to do some URL munging so browsers (IE) can't screw
up and insist it's not a PDF just because the URL doesn't *look* like what
they expect a PDF URL to look like.
You can find my posts in the archives about PATHINFO, or an FDF article in
php architect I wrote that covers this (and more) or...
--
Like Music?
http://l-i-e.com/artists.htm