Advertisement
Online Test Banks
Score higher
See Online Test Banks
eLearning
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

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

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 →
    </body>
    </html>
  3. Save the file as pageBottom.txt in your document root.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win an iPad Mini. Enter to win now!