PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

fwrite> <ftell
Last updated: Wed, 03 Jun 2009

view this page in

ftruncate

(PHP 4, PHP 5)

ftruncate -- Truncates a file to a given length

Description

bool ftruncate ( resource handle, int size )

Takes the filepointer, handle, and truncates the file to length, size. Returns TRUE on success or FALSE on failure.

Note: The file pointer is changed only in append mode. In write mode, additional fseek() call is needed.

Note: Prior to PHP 4.3.3, ftruncate() returns an integer value of 1 on success, instead of boolean TRUE.

See also fopen() and fseek().



add a note add a note User Contributed Notes
ftruncate
There are no user contributed notes for this page.

fwrite> <ftell
Last updated: Wed, 03 Jun 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites