Include
Require use methods such as require ("myrequirefile.php"); This function is usually placed at the top of the PHP program, PHP program before executing, will first read into the require designated to introduce the file, so that it becomes part of the PHP Program Web page. A commonly used function can be introduced into a Web page in this way.
Include use methods such as include ("myincludefile.php");. This function is typically placed in the processing section of the Process Control. The PHP Program page reads the included file when it is read. This way, you can simplify the process of executing a program.
PHP's require () performance is similar to include (). The difference is that, for include (), files are read and evaluated every time the include () is executed, whereas for require () the file is processed only once (in fact, the contents of the file replace the require () statement). This means that if you have code that contains one of these directives and code that is likely to execute multiple times, then using require () is a high efficiency. On the other hand, use include if you are reading different files each time you execute your code, or if you have a loop over a set of file iterations, because you can set a variable for the file name you want to include, and use that variable when the parameter is included ().