Using the header file in PHP involves two functions: Include () and require (). These two functions have very little difference, but they are very important. So we need to study them carefully.
The require () function works in a similar way as xssi;ProgramWhich part of the file uses this function. Only when the program starts to run, the header file content is used as part of the program itself.
. Therefore, if you use the require () function in a condition determination statement, the header file will be included even if the condition is not true.
The include () function only includes the header file content when this statement is executed. If the program does not run here, PHP will not care about it. This means that when you use include in the condition determination part, it will work exactly as you want.
In addition, if you use the require () function and the header file you specified does not exist, the program stops running and produces errors. If you use include (), the program generates a warning message, but continues to run.