note 44702 deleted from function.ftruncate by bjori

From: Date: Thu, 16 Nov 2006 16:19:02 +0000
Subject: note 44702 deleted from function.ftruncate by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-119806@lists.php.net to get a copy of this message
Note Submitter: latet at poczta dot onet dot pl ---- I want to report: on Apache/2.0.48 (Linux/SuSE), PHP Version 4.3.3. It is very different in "a" and in "r" modes. After fopen in "a" mode, I don't have to fseek before ftruncate ($fp, 0) and even between ftruncate and the following fputs (if I need to write to the begining of the file). But if I open in "r" mode and read some bytes, and then I want to ftruncate ($fp, 0) and write again - I do need to put fseek($fp, 0); just after ftruncate ($fp, 0). Latet

« previous php.notes (#119806) next »