if all you want to do is read the entire file try $contents = file_get_contents($filename); On Tuesday 25 October 2005 11:54 pm, John Taylor-Johnston wrote: > It does what I want, but I worry 4096 may not be big enough. Possible? > Is there a way to detect the filesize and insert a value for 4096? > $buffer = fgets($dataFile, $filesize); > Is this what it is for? > John > > > <?php > #http://ca3.php.net/fopen > $filename = "/var/www/html2/assets/about.htm" ; > $dataFile = fopen( $filename, "r" ) ; > while (!feof($dataFile)) > { > $buffer = fgets($dataFile, 4096); > echo $buffer; > } > $sql = "insert into table ... $buffer"; > ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php