ForWhen using PHP function require () to include an external PHP file, the contents of the external file will be included in the PHP file as long as the PHP file is executed, and the error will be given when the external file contains an error, and the execution of the PHP file is stopped.
Example:
program code to invoke file Config.inc:
- < ? PHP
- echo "This is what is called: Hello!";
- ?>
Program code for current script example01.php:
- < ? PHP
- echo "Example of code reuse:";
- Require (' config.inc ');
- Call another file Config.inc,
Content in output Config.inc
- ?>
Instance Location: mrsl4example01.php
The result is: Code Reuse Example: This is what the PHP function require () is called: Hello! Using the Require function.
http://www.bkjia.com/PHPjc/446230.html www.bkjia.com true http://www.bkjia.com/PHPjc/446230.html techarticle for the use of PHP function require () contains external PHP files, as long as the PHP file itself is executed, the contents of the external file will be included in the PHP file itself, when the inclusion of external files error ...