php include function

The include() statement will evaluate and include a file into the location where it is called. Including a file produces the same result as copying the data from the file specified into the location in which the statement appears.

include function Syntax :


Like the print and echo statements, you have the option of omitting the parentheses when using include().

include example :

  Include "includes/";
  /* the script continues here */

if you want to include a series of predefined functions and configuration variables, you could place them into a separate file(called, for example), and then include that file within the top of each PHP script.