Forum und email

ftruncate

(PHP 4, PHP 5)

ftruncate — Tronca un file alla lunghezza data

Descrizione

bool ftruncate ( resource $handle , int $size )

Prende il puntatore al file handle e tronca il file alla lunghezza indicata da size . Restituisce TRUE in caso di successo, FALSE in caso di fallimento.

Nota: Nelle versioni di PHP precedenti alla 4.3.3, la funzione ftruncate() restituisce un integer di valore 1 se l'operazione riesce, anziché restituire boolean TRUE.

See also fopen() and fseek().