Difference between “include” and “require” in php
问题 Is there any difference between them? Is using them a matter of preference? Does using one over the other produce any advantages? Which is better for security? 回答1: You find the differences explained in the detailed PHP manual on the page of require: require is identical to include except upon failure it will also produce a fatal E_COMPILE_ERROR level error. In other words, it will halt the script whereas include only emits a warning ( E_WARNING ) which allows the script to continue. See