How to Create the Bottom of the Page with a PHP Template

By Steve Suehring, Janet Valade

Before you create the bottom of the page in a PHP template form, you first need to create the top of the page. With the top of the page created in template form, create the bottom by following these steps.

  1. Open classPage.php if it isn’t already opened.

  2. Within classPage.php, place the following code, below the closing brace for the _getHead() method:

        public function getBottom() {
            return file_get_contents("pageBottom.txt");
        } //end function getBottom()
  3. Save the file.

This code simply retrieves the contents of a file called pageBottom.txt. Now’s as good a time as any to build that file. Follow these steps:

  1. Create a new empty file within your text editor.

  2. Within the file, place the following HTML:

    <div id="footer">
    Copyright (c) 2013 Steve Suehring.
    </div>  <!-- end footer →
  3. Save the file as pageBottom.txt in your document root.