An external file
can be included anywhere in a Php file by using the Php include
The include command simply takes all the text that exists in
the specified file and copies it into the file that uses the include
When a file is included:-
included file inherits the functions, classes and variables above the line on which the
From that point forward, all functions, classes
and variables defined in the included file have the global scope.
An Include Example
Say we wanted to create a common menu file that all our pages
will use. A common practice for naming files that are to be included is
to use the ".inc" extension. Since we want to create a common menu
let's save it as "menu.inc".