Hello Bug,
Tuesday, March 13, 2001, 12:34:46 PM, you wrote:
BD> ID: 9617
BD> Updated by: dbeu
BD> Reported By: [EMAIL PROTECTED]
BD> Old-Status: Open
BD> Status: Closed
BD> Bug Type: Filesystem function related
BD> Assigned To:
BD> Comments:
BD> following script works okay for me (win2k) so closing.
BD> $output = fopen("test.txt", "a+");
BD> echo "bytes written: ", fputs($output, "test"), "\nfile offset: ".
ftell($output);
BD> fclose($output);
?>>
BD> Previous Comments:
BD> ---
BD> [2001-03-08 06:02:20] [EMAIL PROTECTED]
BD> Open an existing text file (insert some crap before) like:
BD> $output = fopen("test.txt", "a"); #we want append something
BD> Here is the problem:
BD> $position = ftell($output); #returns always 0 and not the real fileposition!!!
BD> fputs($output, "test"); #but this works without any problems (it has the real
fileposition, but ftell gets the false one)
BD> I found this bug only on windows systems, not on linux.
BD> Achim
BD> ---
BD> ATTENTION! Do NOT reply to this email!
BD> To reply, use the web interface found at http://bugs.php.net/?id=9617&edit=2
do you tried to get the fileposition before you write something with
fputs and i tested it only with "a" and not with "a+", may be
there is a difference... you can get my script on
http://www.lkcc.org/achim! search for "#fix for windows?!?!" within
the input.php. the whole program doesnt work, if you remove this line
from the sourcecode.
--
Best regards,
Achimmailto:[EMAIL PROTECTED]
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]