PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<ftellfwrite>
Last updated: Mon, 16 Jul 2012

ftruncate

(PHP 4, PHP 5)

ftruncate -- 将文件截断到给定的长度

说明

bool ftruncate ( resource handle, int size )

接受文件指针 handle 作为参数,并将文件大小截取为 size。如果成功则返回 TRUE,失败则返回 FALSE

注: 在 PHP 4.3.3 之前,ftruncate() 在成功时返回一个 integer 值 1,而不是 booleanTRUE

参见 fopen()fseek()




<ftellfwrite>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST