$maxlen){ $temp = explode("\n\n", $data); unset($temp[count($temp)-1]); $data = implode("\n\n", $temp); } if(@$handle = fopen($file, 'w')){ fwrite($handle, $input.$data); fclose($handle); unset($file, $maxlen, $input, $data, $temp, $handle); } ?>