Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Powers, D. (2022). Lightening Your Workload with Includes. In: PHP 8 Solutions. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7141-4_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7141-4_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7140-7
Online ISBN: 978-1-4842-7141-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)