Enter your Sign-on user name and password.

Forgot password?
  • Follow us on:
Loading video...

Start Learning Now

Our free lessons will get you started (Flash® 10 required).
Get immediate access to our entire library.

Sign up for Educator.com

Features Overview

  • Get on-demand access to our complete library
  • Search and jump to exactly what you need to learn
  • Track your progress
  • Download practice and lesson files
  • *Ask questions and get answers from our community & instructors

Include Files & Web Application Introduction

  • An include statement is used to include the contents of one PHP file within another PHP file. The included file is referred as an ‘include file’.
  • If a file included via an include statement cannot be found, PHP will issue a warning, and the script will continue executing.
  • A require statement performs the same action as an include statement, except that if the file to be included cannot be found, a fatal error occurs halting the execution of the script.
  • Code reuse is a practice used to place redundant or common PHP and HTML code in separate files allowing you to make changes in one place and have it affect many places.
  • For this course, include files containing only HTML will have a .html extension. Those containing only PHP code will have a .php extension, and those containing both HTML and PHP code will have a .phtml extension.
  • Each version of the store web application will be located in a intro2php/web_app/version-x.x directory in the document root. Include files for each version will be contained in a corresponding intro2php/web_app/version-x.x/includes directory.
  • Additional Resources:

Include Files & Web Application Introduction

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

Computer Science: Introduction to PHP