Lightening Your Workload with Includes
David M W Powers · Apress eBooks · 2021
The ability to include the contents of one file inside another means common elements, such as a header, footer, or navigation menu, can be incorporated into multiple pages. This is a great timesaver because PHP merges the content into each page on the server, allowing you to update a menu or other common elements by editing and uploading a single file. This chapter explains the subtle, but important differences of the four include commands. You’ll also see how to create a “you are here” menu link, generate a page’s title from its filename, and display random images complete with captions.