PHP   34

include external files

Guest on 15th May 2022 04:22:08 AM

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>PHP Example: include external files</title>
  5. </head>
  6. <body>
  7.   <?php echo "<p><h2>Initial script</h2>";
  8.     include("include-ex1b.php");
  9.     echo "<h2>Back to initial script</h2>";
  10.     include("include-ex1c.html");
  11.     echo "<h2>Back again to script</h2></p>";
  12.     echo "let's include a php file that has syntax problems ---> <br/><br/>";
  13.     include("include-ex1wrong.php");
  14.     echo "<h2>Finally back to script</h2></p>";
  15.   ?>
  16.  </body>
  17. </html>

Raw Paste


Login or Register to edit or fork this paste. It's free.