php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10388 File to file I/O problems
Submitted: 2001-04-18 19:25 UTC Modified: 2001-07-22 12:55 UTC
From: rainwave at email dot msn dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4 OS: Windows 98
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rainwave at email dot msn dot com
New email:
PHP Version: OS:

 

 [2001-04-18 19:25 UTC] rainwave at email dot msn dot com
Whenever I read from file and write directly to another, such as in this line:
fwrite($fileout,fread($filein,255));
Any occurances of the byte 0x0A will be replaced by 0x0D0A. If I try to read indirectly, like this:
$out = fread($filein,255);
fwrite($fileout,$out);
The file will always be saved as ASCII, even if I add the "b" flag to fopen. Is this a bug, or am I making a stupid mistake?
Your time and effort are greatly appreciated.
 ~ Joe Ferris ~
P.S. Magic quotes are off

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-14 16:10 UTC] sniper@php.net
Without complete (but short) script it's hard to tell.
And have you tried with php 4.0.5 ?

--Jani

 [2001-07-22 12:55 UTC] andy@php.net
no feedback after 30+ days.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC