ssi_includes_with_php_and_vice-versa
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ssi_includes_with_php_and_vice-versa [2009/01/06 10:06] – created juckins | ssi_includes_with_php_and_vice-versa [2025/03/20 19:16] (current) – juckins | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ==== HTML Server-Side includes (SSI) with PHP and vice-versa ==== | ||
| + | |||
| To allow an .shtml file to parse a .php include: | To allow an .shtml file to parse a .php include: | ||
| Line 15: | Line 17: | ||
| ------- | ------- | ||
| - | To allow a .php file to include .shtml files, edit / | + | To allow a .php file to include .shtml files, |
| < | < | ||
| - | include_path = /home/httpadm/docs | + | include_path = /path/to/docs |
| - | doc_root = /home/httpadm/docs | + | doc_root = /path/to/docs |
| </ | </ | ||
| service httpd restart | service httpd restart | ||
| Line 24: | Line 26: | ||
| And use the following type of syntax in the .php file: | And use the following type of syntax in the .php file: | ||
| < | < | ||
| - | <?php include(" | + | <?php include(" |
| </ | </ | ||
| + | Note the leading “../” in the include path. | ||
| The include file does not have to be .shtml (could be .html or .php, obviously) | The include file does not have to be .shtml (could be .html or .php, obviously) | ||
ssi_includes_with_php_and_vice-versa.1231254370.txt.gz · Last modified: by juckins
