Calls an external script to execute.
require() works just like include(), but results in a fatal error, rather than a warning, if the specified file does not exist.
<?php
///////////////////////////////////////////////////////////////////////
// copyright.php
// -------------
// print "<br><br>Copyright 2004 The Author. None of the of contents"
// . " of this page may be used without prior written permission "
// . "from The Author."
///////////////////////////////////////////////////////////////////////
print "This is a page with a lot of useful<br>"
. "information about all sorts of things.";
require("copyright.php");
?>
This is a page with a lot of useful
information about all sorts of things.
Copyright 2004 The Author. None of the of contents of this page may be used without prior written permission from The Author.
require() can be used to add in things that should be on many or all pages, for example a copyright notice.