At 00:36 13.11.2002, Joseph Szobody said: --------------------[snip]-------------------- >Folks... when I execute the following code, I get a big black nothing. I >think it's the right size, but all black. No image is showing up. What gives? > > >Header("Content-type: image/tiff"); > >$filename = image.tif >$file = fopen("$filename",rb); >fpassthru($file); >fclose($file); --------------------[snip]--------------------
You get a syntax error, but the browser cannot display it due to the MIME type. You need to quote the filename (would read "imagetif" if unquoted), and put a semicolon after the assignment. $filename = 'image.tif'; $file = fopen($filename,rb); // don't need quotes here if ($file) { // should always check if the file exists Header("Content-type: image/tiff"); fpassthru($file); fclose($file); } Using this sequence will send the MIME header only if the file is available and could be opened. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php