PHP 手冊
上一頁 |  | 下一頁

# 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. 成功回傳`TRUE`失敗回傳`FALSE`。

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

See also fopen() and fseek().

上一頁 | 最開頭 | 下一頁
ftell | 上一層 | fwrite