[PHP-DEV] PHP 4.0 Bug #9617 Updated: fileposition error From: dbeu <email protected>
Date: 03/13/01

ID: 9617
Updated by: dbeu
Reported By: achim <email protected>
Old-Status: Open
Status: Closed
Bug Type: Filesystem function related
Assigned To:
Comments:

following script works okay for me (win2k) so closing.

<?php
$output = fopen("test.txt", "a+");
echo "bytes written: ", fputs($output, "test"), "\n<br>file offset: ". ftell($output);
fclose($output);
?>

Previous Comments:
---------------------------------------------------------------------------

[2001-03-08 06:02:20] achim <email protected>
Open an existing text file (insert some crap before) like:

$output = fopen("test.txt", "a"); #we want append something

Here is the problem:

$position = ftell($output); #returns always 0 and not the real fileposition!!!

fputs($output, "test"); #but this works without any problems (it has the real fileposition, but ftell gets the false one)

I found this bug only on windows systems, not on linux.

Achim

---------------------------------------------------------------------------

ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9617&edit=2

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>