|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
How Do I Output Image From Database
Can anyone see what I'm doing wrong below? If I call PageOne.php in my browser I get a broken image thing. if I copy and paste the URL (ImageOutput.php?PictureDB=PictureJPEG_98x98_15.jp g) I get just a bunch of gooble-de-gook in the browser that looks like this: µU15_)A+G½ïµÿ‚V‹µµ»¶þA‡áÌ"§Jå%:‰;®^Xßk§«óµ_
PHP Code:
Thanks.
__________________
Thomas Jefferson: "Democracy will work only until the political incumbents discover they can perpetuate themselves in office by taxing the industrious to bribe the indolent." |
|
#2
|
|||
|
|||
|
are u just trying to display a picture from the database?...like get the filename and then output it?
|
|
#3
|
|||
|
|||
|
Bruski;
I've already tried doing that. It won't work. The binary data for the image is stored in the bin_data column - not the column that has the image name. It won't work to just simply put the image name in the <img src=""> bracket. That's the first thing I tried. |
|
#4
|
|||
|
|||
|
are you saving your picture names in a database?
|
|
#5
|
||||
|
||||
|
Volitics, for most uses, it's simpler to store the image on the filesystem and a reference to it in the database. Else you have to worry about sending headers for each image and pushing them out at the right time, etc. Let the Web server handle that; just store references to the images.
|
|
#6
|
|||
|
|||
|
dhouston,
Thank you for responding to my problem. That's what I was thinking - that getting the headers right would be difficult. A lot of it depends on how the user's operating system reads the image I think. Anyway, it's a mess. Storing the images in a file system does appear to be the best way to go at this point. Thanks again. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > How Do I Output Image From Database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|