PHP File Inclusion

In PHP, you can call the content of one PHP Script into another PHP Script using PHP File Inclusion Mechanism.The include and require statements are used to insert script written in other files.

include and require are same in functionality, but:

  • require will produce a fatal error and stop the script.
  • include will only produce a warning and the script will continue.

The include() Function

The require() Function