Bug #1032: file() not retrieving GIF properly

From: Date: Tue, 05 Jan 1999 23:11:56 +0000
Subject: Bug #1032: file() not retrieving GIF properly
Groups: php.dev 
Request: Send a blank email to php-dev+get-3302@lists.php.net to get a copy of this message
From: birnbaum@k2design.com 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@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3302) next »