ID: 24059
User updated by: michael dot hofinger at utanet dot at
Reported By: michael dot hofinger at utanet dot at
-Status: Bogus
+Status: Closed
Bug Type: Filesystem function related
Operating System: Windows XP SP1 German
PHP Version: 4.3.2
New Comment:
It works. :-)
Thank you for your help!!
Previous Comments:
------------------------------------------------------------------------
[2003-06-06 09:57:32] [EMAIL PROTECTED]
Starting with PHP 4.3.2, the default mode for all fopen()d files is
binary mode to match CLI and CGI versions of PHP, and also the default
behaviour of PHP on other platforms.
You can use the 't' mode to explicitly open files in text mode like
this:
$datei = fopen($dateiname, 'at');
------------------------------------------------------------------------
[2003-06-06 08:40:32] michael dot hofinger at utanet dot at
example:
<?php
$dateiname = "clients.txt";
$datei=fopen($dateiname,"a");
fputs($datei,"hello");
fputs($datei,"\t"); // tab OK!
fputs($datei,"test");
fputs($datei,"\n"); // new line NOT OK!
fputs($datei,"hello");
fclose($datei);
?>
the script work with PHP 4.3.0 without problems!
(i use the php.ini from php 4.3.0 although in 4.3.2)
Apache 1.3.27
php as module
mfg
Mike
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24059&edit=1