If the PHP statement is placed in an HTML file, it will not be processed. However, if you use the Require () statement to load the HTML file, any PHP commands within the file will be called. Therefore, you can use any extension to name the include file, but it is a good idea to follow a convention, such as naming the extension. inc or. php.
If you do not use the. php extension name, you need to place the file to be introduced outside the document tree to prevent users from viewing the source code as text when they are loaded directly into the browser.
If the extension is. php, but contains only a subset of pages or scripts, this can cause errors.
Note: Regardless of which extension is used, the PHP code in the file to be introduced must be placed between PHP tags, otherwise the code will be treated as text or HTML script and therefore will not be executed.
The above introduces the PHP file require introduction considerations, including the require,php file aspects, I hope that the PHP tutorial interested in a friend to help.