Lab # Exercise #14. Create a text file and read the entire file into a single string.
**************************************************************
CODES:
<?php
echo "<p style='color:red;'>File Reading using file_get_contents AND fread:</p>";
$newFile = "lab02-14.txt";
$fh = fopen($newFile, "r") or die("Couldn't open $newFile");
$fileHandler =file_get_contents($newFile);
echo $fileHandler;
echo "<p>**************************************************************</p>";
$filePointer = fread($fh, 1024);
echo $filePointer;
fclose($fh);
?>
**************************************************************
ANSWER:
File Reading using file_get_contents AND fread:
This is a test
Here's another paragraph.
**************************************************************
This is a test
Here's another paragraph.