Re[2]: [PHP-DB] Still trying to get image from /tmp path

From: Date: Mon, 30 Jul 2001 07:56:34 +0000
Subject: Re[2]: [PHP-DB] Still trying to get image from /tmp path
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10892@lists.php.net to get a copy of this message
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@akl.ru, http://larionov.akl.ru •Íèêòî íå îáíèìåò íåîáúÿòíîãî.• © Kos'ma prutkov

« previous php.db (#10892) next »