At 00:36 13.11.2002, Joseph Szobody said:
>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);

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");

Using this sequence will send the MIME header only if the file is available
and could be opened.

   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to