Re: ftruncate

From: Date: Thu, 15 Mar 2007 20:12:06 +0000
Subject: Re: ftruncate
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-250689@lists.php.net to get a copy of this message
On Thu, March 15, 2007 4:57 am, Swati Asthana wrote: > Is there any function in php through which we can delete / truncate > the > content of a text file that is before the file pointer/file handler ? > > can we use truncate? > actually im using a function to pick the content from a text file > using 2 > delimiters, but that function checks only the first instance of the > delimiter.. If you want to chop the END of a file off, the ever-so-cleverly-named ftruncate will do that. http://php.net/ftruncate If you want to chop the FRONT of a file off, I don't think you can do that... In fact, given the way some operating systems maintain their file catalogs, I'm almost positive you can't do that. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#250689) next »