Re: Delete File Contents?
| From: | Matt Friedman | Date: | Mon, 17 Dec 2001 19:08:50 +0000 |
| Subject: | Re: Delete File Contents? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77981@lists.php.net to get a copy of this message | ||
http://www.php.net/manual/en/function.ftruncate.php
Chris writes:
I've created a program that runs a process then stores the results to a file on the server. I would like the file to contain only the most recent update, but it seems I can only append to my using fopen. Is there a way to open the file and overwrite the data in that file? I've considered deleting the file and creating a new one but that seems like a lot to do. It would be nice if there were a way to set a pointer to the top of the file and overwrite. Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net