|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-09-02 22:28 UTC] sniper@php.net
[2000-10-02 23:03 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Jan 14 22:00:01 2026 UTC |
<? $file = fopen("C:\Test.Txt", "w"); fputs($file, "0123456789\r\n"); fputs($file, "0123456789\r\n"); fclose($file); $file = fopen("C:\Test.Txt", "r+"); $line = fgets($file, 1024); echo ftell($file)."<P>"; echo strlen($line)."<P>"; fseek($file, ftell($file) - strlen($line)); fputs($file, "test"); fclose($file); echo "Done"; ?> The code above produces different outputs depending on if php.exe or php4isapi.dll is run. Both create a file with 2 lines with 0-9 on a line. The php.exe will then back up and overwrite the 0-3, but the php4isapi.dll will back up and overwrite the 1-4. Output of pgp.exe ================= 12<P>12<P>Done Output of php4isapi.dll ======================= 13<P>12<P>Done This bug has been reproduced on Windows 95/98/NT/2000 and on version 4.0, 4.0.1, 4.0.1pl1, 4.0.1pl2.