require_once statement and require statement are exactly the same, the only difference is PHP will check whether the file has already been included, and if so, it will not be included again.
See the documentation of include_once to understand the meaning of _once and understand the difference from without _once.
How to use
define('__ROOT__',dirname(dirname(__FILE__))));
require_once(__ROOT__.'/config.php');
?>
Method 2:
2Example: Edit
2 9 10 |
<🎜>require_once('sys/config.php');<🎜>
<🎜>require_once('header.php');<🎜>
<🎜>?>
System PlatformA simple message board system platform A simple message board.<🎜>require_once('footer.php');<🎜> <🎜>?> |