Resources & Services: Computing
PHP Includes
To do a server side include of a file onto a web page, here is how this can be done in PHP.
- Make sure that the web page has the extension .php. Otherwise the web server will not execute the php script.
- In the location where you wish an external file to be included in the web page place the following script: <?php include('path/to/file.txt'); ?>
