#18967 [NEW]: base64_encode troubles
| From: | fxdc at wanadoo dot fr | Date: | Mon, 19 Aug 2002 17:05:28 +0000 |
| Subject: | #18967 [NEW]: base64_encode troubles | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-17212@lists.php.net to get a copy of this message | ||
From: fxdc@wanadoo.fr
Operating system: Linux pomerol 2.2.19 #8 SMP
PHP version: 4.1.2
PHP Bug Type: *General Issues
Bug description: base64_encode troubles
Hello sorry for my poor English.
My problem : I use base64_encode to encode a file for send by E-mail. I
use the following code to find the problem.
$file=$name1;
$fp=fopen($file,"r");
$temoin="./temoin/".time();
$fq=fopen ($temoin,"w");
$attachmentorig=fread($fp,filesize($file));
$attachment=base64_encode($attachmentorig);
$controle= "file name :".$file."\r\n file size:".filesize($file)."\r\n
file content:".$attachmentorig."\r\n file encoded :".$attachment.
fclose($fp);
fwrite ($fq,$controle);
fclose ($fq);
So sometimes, Name, size, file content are exactly the sames, but file
encoded is different. Can you explain me please ?
--
Edit bug report at http://bugs.php.net/?id=18967&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=18967&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=18967&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18967&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18967&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18967&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18967&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18967&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18967&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18967&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18967&r=globals