|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-28 04:48 UTC] claudio dot pabst at ch dot abb dot com
I have a problem with the fputs() function.
For example:
$newarray[0] = "test123\n";
$newarray[1] = "blablabla\n";
$newarray[2] = "hello\n";
if($myfile = fopen("testfile.txt", "w")) {
foreach($newarray as $line) {
fputs($myfile, $line, strlen($line));
}
fclose($myfile);
... a script like this works with php 4.3.1, but not with 4.3.2RC4.
Instead of a newline, the fputs function writes another ascii char. Its impossible for me, to read a file into an array after usinf fputs (php 4.3.2RC4).
Perhaps, this problem only exists on windows systems...
Regards,
Claudio
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 10:00:01 2025 UTC |
fopen("testfile.txt", "wb"); ^ Use binary mode this is a duplicate of another report and is an issue with the Apache SAPI.