php code to Read a line from a file



$linenum = 2; //will read 2nd line of the file.
$path = "read/new.txt";
$handle = fopen($path, "r");
$lines=file($path); //$lines is an array
echo htmlentities($lines[$linenum]);
?>


PHP Free Code

Posted in |