RE: Can you make a file empty?

From: Date: Wed, 21 Feb 2001 11:30:03 +0000
Subject: RE: Can you make a file empty?
Groups: php.general 
Request: Send a blank email to php-general+get-40936@lists.php.net to get a copy of this message
does this not already do it? according the manual "w" as the second parameters will "place the file pointer at the beginning of the file and truncate the file to zero length". Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: Jan Grafström [mailto:jan@lillemanshus.com] > Sent: 20 February 2001 18:47 > To: php-general@lists.php.net > Subject: Can you make a file empty? > > > Hi! > I am trying to delete all text in a file. > $yourfile = "file.txt"; > $fp = fopen($yourfile,w) > "is there any good code to put in here?" > fclose($fp); > > Thanks for any help. > > Regards > > Jan > >

« previous php.general (#40936) next »