Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001072

Re[2]: [PHP-DB] Still trying to get image from /tmp path From: Sergey Larionov (subs <email protected>)
Date: 07/30/01

Afternoon, Luc!

.·•Cite 30 èþëÿ 2001 ã., 4:21:32•·.
LS> Maybe this helps:

LS> $file = "/tmp/pathtoimage/image.jg"
LS> $fp = fopen($file, filesize($file));
LS> $image = fread($fp, filesize($file)); //not sure about fread function¿

LS> print $image //or imagejpeg($image), I'm not sure..

No. When you echoing $image, binary data will putted into the stream.
How opening j[eg-image in notepad.exe.
 You must put the header to begin of stream (header("Content-type:
 text/jpeg");)
Call this script "image.php" for example and show image using this
html:
<img src=image.php>

·•·•·•·
Sergey Larionov - larionov <email protected>, http://larionov.akl.ru
•Íèêòî íå îáíèìåò íåîáúÿòíîãî.•
© Kos'ma prutkov

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