Freshers Aptitude technical questions
Freshers Job Alert
Bookmark and Share

  Includes

  • Use the server commands #INCLUDE FILE (for a path relative to the current file) or #INCLUDE VIRTUAL (for a path relative to the virtual root).

For example, the following lines include a file named Header.inc at the top of a page and a file named Footer.inc at the bottom of a page:

<!-- #INCLUDE FILE="Header.inc" -->   Normal HTML text and script goes here.   <!-- #INCLUDE FILE="Footer.inc" -->

When the file is processed by the Web server, the entire contents of the Header.inc and Footer.inc files are inserted into the file at the location of the #INCLUDE directive. Any script in Header.inc and Footer.inc is processed after all includes have been merged into the main file. You can even nest included files by including a file that contains another #INCLUDE directive.