From:             claudio dot pabst at ch dot abb dot com
Operating system: Windows 2000 Server
PHP version:      4.3.2RC4
PHP Bug Type:     Unknown/Other Function
Bug description:  Problem with fputs()

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
-- 
Edit bug report at http://bugs.php.net/?id=23846&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23846&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23846&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23846&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23846&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23846&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23846&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23846&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23846&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23846&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23846&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23846&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23846&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23846&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23846&r=gnused

Reply via email to