Date: 01/05/99
- Next message: Dave Walton: "Re: [PHP-DEV] CVS update: php3/doc/functions"
- Previous message: Colovic Igor: "[PHP-DEV] Can not login to Interbase database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: birnbaum <email protected>
Operating system: linux (redhat 5.2)
PHP version: 3.0.6
PHP Bug Type: Misbehaving function
Bug description: file() not retrieving GIF properly
I believe the following two code fragments should both put out the image in question but only the first one (readfile) works:
------------
Header("Content-type: image/gif");
readfile("/home/httpd/html/olaf/graphics/k2.gif");
exit;
-----------
-----------
Header("Content-type: image/gif");
$image = implode(file("/home/httpd/html/olaf/graphics/k2.gif"), "");
print $image;
exit;
----------
I don't want to put the file straight out to STDOUT, I want to hold it and examine it in memory.
The second fragment produces a broken GIF and, using some prints, I have determined that it doesn't get the entire file, though I can't figure out exactly which bytes it gets and doesn't get.
It also fails when using a URL instead of a server file.
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: Dave Walton: "Re: [PHP-DEV] CVS update: php3/doc/functions"
- Previous message: Colovic Igor: "[PHP-DEV] Can not login to Interbase database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

