Forum Moderators: coopster
<?php
$file = "news.txt";
if (!$file_handle = fopen($file,"r")) { echo "Cannot open file."; }
if (!$file_contents = fread($file_handle, filesize($file))) { echo "Cannot retrieve file contents."; }
else {
$filedone = ftruncate($file_contents,50);
echo "$filedone"; }
fclose($file_handle);
?>
but what i want to do is only display about 60 characters .... i have read that i need to use the ftranuce function but have had no luck implementing it... any ideas