Reply to Downloading image from MySQL

Your name:

Reply:


Posted by jourb on 11/04/05 18:52

:shock: I'm having the same type of problem. Though I was able to
upload the file into the database, I'm unable to get it display
properly on the site. It spits it out in binary. I've looked on a
bunch of different sites and they all seem to give the same sample
code, it just doesn't work for me.

I'm trying to display the image:
$data = $row['thumbnail'];
$type = ("image/jpg");
header( "Content-type: $type");
echo $data;

And it's just displaying a bunch of crap.
I know that the file did properly download.
I think the problem has something to do with the header.

If i put the header near the top of the page and not close to the echo
$data; then it trys to open the php file i'm working on. And if I put
it where is it, it says that: Warning: Cannot modify header
information - headers already sent

HELP! I'm going nutso over here.
:shock: :?: :!:


Sent via Archivaty.com

[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

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