#24071 [Opn->Csd]: 4.3.2 fopen("filename", "a") not place file pointer to the end.

From: Date: Sat, 07 Aug 2004 08:56:51 +0000
Subject: #24071 [Opn->Csd]: 4.3.2 fopen("filename", "a") not place file pointer to the end.
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969362817@lists.php.net to get a copy of this message
ID: 24071 Updated by: vrana@php.net Reported By: artem at w510 dot tm dot odessa dot ua -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: redhat PHP Version: 4.3.2 New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. "ftell() gives undefined results for append-only streams (opened with "a" flag)." Previous Comments: ------------------------------------------------------------------------ [2003-06-06 18:33:38] artem at w510 dot tm dot odessa dot ua maybe, but i used this without any problem from version 4.0 (one of first) to store initial append position - that' about some years... and it's worked through updates up to 4.2.3 ------------------------------------------------------------------------ [2003-06-06 18:11:03] wez@php.net 'a' mode forces the kernel to always write at the end of the file. ftell() will give undefined results for append-only streams, as will seeking. Writing to such a file should always be appended, regardless of the results from ftell(). Making this a documentation problem. ------------------------------------------------------------------------ [2003-06-06 17:46:09] artem at w510 dot tm dot odessa dot ua after installing 4.3.2 $fr = fopen("filename", "a"); $pointer = ftell($fr); points to 0! forced to add fseek($fr, 0, SEEK_END); $pointer = ftell($fr); to move to the file end ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24071&edit=1

« previous php.doc (#969362817) next »