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); ?> Share this: Share on X (Opens in new window) X Share on Facebook (Opens in new window) Facebook Like Loading...