the manual implies that you don't need to write anything to the file to
clear what's in it already, is this not the case?

        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: PHPBeginner.com [mailto:[EMAIL PROTECTED]]
> Sent: 22 February 2001 11:15
> To: Tim Ward; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] RE: Can you make a file empty?
> 
> 
> yeah, you can just fputs() an empty string in it and close the file.
> In this way you'll empty it all.
> 
> 
> Sincerely,
> 
>  Maxim Maletsky
>  Founder, Chief Developer
> 
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
> 
> 
> 
> 
> -----Original Message-----
> From: Tim Ward [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 21, 2001 8:30 PM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: [PHP] RE: Can you make a file empty?
> 
> 
> 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:[EMAIL PROTECTED]]
> > Sent: 20 February 2001 18:47
> > To: [EMAIL PROTECTED]
> > 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
> >
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 
> 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to