ID: 13426
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Filesystem function related
Operating System: Windows 2000 Professional
PHP Version: 4.0.6
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2001-09-25 04:54:16] [EMAIL PROTECTED]
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 this bug report at http://bugs.php.net/?id=13426&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]