O'Reilly logo

PHP Solutions: Dynamic Web Design Made Easy by David Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4 LIGHTENING YOUR WORKLOADWITH INCLUDES

What this chapter covers:

  • Using PHP includes for common page elements
  • Protecting sensitive information in include files
  • Automating a "you are here" menu link
  • Generating a page's title from its filename
  • Automatically updating a copyright notice
  • Displaying random images complete with captions
  • Using the error control operator
  • Using absolute pathnames with PHP includes

One of the great payoffs of using PHP is that it can save you a lot of repetitive work. Figure 4-1 shows how four elements of a static web page benefit from a little PHP magic.

image

Figure 4-1. Identifying elements of a static web page that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required