Close a file after reading : File Close « File Directory « PHP






Close a file after reading


<?php
   $fh = fopen("./demoCSV.csv", "rt");
   while (!feof($fh)) 
      echo fgets($fh);
   fclose($fh);
?>
<!--
A,a@example.com,11111
B,b@example.com,22222


-->
           
       








Related examples in the same category