Include Statement (SSI)
Rather than editing every page on your website, when updates or changes are made, use the PHP function include() to include a premade widget or module on every page of your site. Shortening the time it takes to maintain the site, increases the time to create content!
You will learn how to include HTML, or any type of web friendly media in your site, using the include() function. Much like an external CSS style sheet, include() functions allow for quick site changes.
- Step 1 - When Should I use the Include Function?
- Navigation Bar
- News Widget
- Ad Area
- Header & Footer
- Step 2 - Using the Include Function
The only parameter for the include() function is the location of the file that you want to include.
The file location is relative to where your .php file is saved.
- how to stratigize an effective include() structure.
- how to use include() statements.
Questions or Comments? Hit the "Questions/Help" tab
You should use the include() function wherever there is a frequently used section of code or a section on your website that contains independence among other elements on the website, such as: