Using one file code in another file is very important, sometimes in a project we need to use the same menubar in multiple files one way is to write menubar code in every file and become very tedious to manage the project, for example, we want to add or remove one link in a menubar so we have to visit every file which contains that menubar and we will change file, so there we need of include and require function.
This include() function copy one file of code into another file.
Note: when the include() function has the wrong file path, the rest of the code does not affect by this.
Include file once
This require() function copy one file of code into another file same as to include()
Note: when the require() function has the wrong file path, the reset of code does affect by it.