PHP File Inclusion

In this tutorial you will learn about the PHP File Inclusion and its application with practical example.

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

 

In this tutorial we have learn about the PHP File Inclusion and its application with practical example. I hope you will like this tutorial.