> <?
> header( "Content-type: image/gif" );
>
> $img = fopen($DOCUMENT_ROOT . "/store/include/TestingImage.gif","rb");
> print($img);
> ?>
> prints this:
> Resource id #1
> I'm trying to print the image as binary or as an image.  Have I missed a
> step?  Hope i'm not being too confusing.

$img is a "file pointer" -- It is simply a "reference" you can use to get
stuff out of a file:

while (!feof($img)){
    $image_data = fread($img, 1000000);
    print($image_data);
}

However, you should be using passthru() instead, since that's pretty much
what it was designed for.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to