<html>
<! GetFile.php                                                >
<! Chapter 8, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script reads a file from the same local path into     >
<! an array and then uses a foreach loop to print the file    >
<! line-by-line.                                              >
<head>
<title>
  Chapter 8 : GetFile.php
</title>
</head>
<body>
<?php
  // Set the file name.
  $fname = realpath("RedRabbit.htm");

  // Read the file into an array.
  $contents = file($fname);

  // Render the file text to the web page.
  foreach ($contents as $name => $value)
    print $value;
?>
</body>
</html>
