PHP ftruncate May 12, 2012 Pramod T P It truncates a file to a given length Example <?php $fp = fopen(“test.txt”, “r”); ftruncate($fp,5); ?>