John Taylor-Johnston wrote:
http://www.php.net/manual/en/function.fread.phpif(!$handle) die('could not open file for reading');
What about error checking if the file contains something as I include below? Is that enough? Is this the right way?
<?php $filename = "/usr/local/something.txt"; $handle = fopen ($filename, "r");
$contents = fread ($handle, filesize ($filename)); fclose ($handle);
if ($contents){echo"<form><textarea>$contents</textarea></form>";} else{echo "no contents there";} ?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php