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: Click to share on X (Opens in new window) X Click to share on Facebook (Opens in new window) Facebook Like Loading...