Re: delete file contents before writing?

From: Date: Mon, 03 Jun 2002 16:35:06 +0000
Subject: Re: delete file contents before writing?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100423@lists.php.net to get a copy of this message
On Mon, 2002-06-03 at 11:37, Jas wrote: > Not sure how I could do this as I could not find a functions on php.net to > allow me to first delete the entire contents of a file "before" writting the > changes supplied by a textarea. Here is what I have thus far: Just fopen a file with the 'w' mode when you want to clear/truncate it before writing to it. $file_open($file_name,'w'); ... would probably do what you want. Toby

« previous php.general (#100423) next »