ftruncate

It truncates a file to a given length

Example

<?php

$fp = fopen(“test.txt”, “r”);

ftruncate($fp,5);

?>

Share