Bug #13426: fread not work

From: Date: Tue, 25 Sep 2001 08:54:17 +0000
Subject: Bug #13426: fread not work
Groups: php.dev 
Request: Send a blank email to php-dev+get-66516@lists.php.net to get a copy of this message
From: cquadalti@libero.it Operating system: Windows 2000 Professional PHP version: 4.0.6 PHP Bug Type: Filesystem function related Bug description: fread not work function encode_file($sourcefile) { if (is_readable($sourcefile)) { $fd = fopen($sourcefile, "r"); $contents .= fread($fd,filesize($sourcefile)); $encoded = chunk_split(base64_encode($contents)); fclose($fd); } return $encoded; } $source = $DOCUMENT_ROOT."/IMAGES/titolomail.gif"; encode_file($source); fopen also don't work with "rb" option and system return a memory violation error -- Edit bug report at: http://bugs.php.net/?id=13426&edit=1

« previous php.dev (#66516) next »