php-db | 2001072
Date: 07/29/01
- Next message: Manuel Lemos: "[PHP-DB] Re: Informix IDS2000 and Zope/Python/Perl/PHP on Linux"
- Previous message: Mike Gifford: "[PHP-DB] Query displays one"
- Maybe in reply to: Mark Gordon: "[PHP-DB] Still trying to get image from /tmp path"
- Next in thread: Sergey Larionov: "Re[2]: [PHP-DB] Still trying to get image from /tmp path"
- Reply: Sergey Larionov: "Re[2]: [PHP-DB] Still trying to get image from /tmp path"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Maybe this helps:
$file = "/tmp/pathtoimage/image.jg"
$fp = fopen($file, filesize($file));
$image = fread($fp, filesize($file)); //not sure about fread function¿
print $image //or imagejpeg($image), I'm not sure..
Grtz,
Luc
luc <email protected>
----- Original Message -----
From: "Mark Gordon" <eyesyte <email protected>>
To: <php-db <email protected>>
Sent: Sunday, July 29, 2001 10:31 PM
Subject: [PHP-DB] Still trying to get image from /tmp path
> Thanks, David. That helped a little but now what I get is:
> <img src=/tmp/phpMVWr5Z> in the output.
>
> The tmp folder is up the directory tree outside of my www folder (on my
> web host's 'puter)- I don't have direct access to it.
>
> Heres the modified code:
>
> $sql=mysql_query("SELECT bin_data FROM binary_data WHERE id=4");
> $row = mysql_fetch_array($sql);
> header("Content-type: image/jpeg");
> echo "<img src=$row[0]>";
>
> How can I use the path stored in the db to retrieve the image?
>
> =====
> Mark
> eyesyte <email protected>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Manuel Lemos: "[PHP-DB] Re: Informix IDS2000 and Zope/Python/Perl/PHP on Linux"
- Previous message: Mike Gifford: "[PHP-DB] Query displays one"
- Maybe in reply to: Mark Gordon: "[PHP-DB] Still trying to get image from /tmp path"
- Next in thread: Sergey Larionov: "Re[2]: [PHP-DB] Still trying to get image from /tmp path"
- Reply: Sergey Larionov: "Re[2]: [PHP-DB] Still trying to get image from /tmp path"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

