Presentation is loading. Please wait.

Presentation is loading. Please wait.

PHP: includes MIS 3501 Jeremy Shafer Department of MIS

Similar presentations


Presentation on theme: "PHP: includes MIS 3501 Jeremy Shafer Department of MIS"— Presentation transcript:

1 PHP: includes MIS 3501 Jeremy Shafer Department of MIS
Fox School of Business Temple University

2 Course Overview We are here... MySQL To do:
2 Weeks We are here... HTML & CSS 2 Weeks PHP 3 Weeks PDO 2 weeks To do: Organize your code with MVC (1 week) Work with forms (1 week) Use cookies and sessions (1 week)

3 (Some assembly required)
Server-Side Includes (Some assembly required)

4 Built-in functions used to assemble content from different files.
The include and require functions are similar. They both inject content from another file into the current PHP page. The require function is the more strict of the two. If the file is not found, an warning is displayed and further processing of the page stops. Include let’s processing continue, but with a warning. These functions are just like their cousins above. They silently prevent the same content from being injected over and over again. The exit and die functions do exactly the same thing: completely terminate further processing of the php page.

5 Moving up and down the hierarchy of our server’s file system
Sometimes we choose to assemble our page based on one or more conditions. Moving up and down the hierarchy of our server’s file system

6 Let’s take a look at… (data) include_exercise.zip
With it we can illustrate: The difference between: include, require, include_once, require_once How include can be used to assemble a web page from multiple child pages How a variables can become available on multiple pages when included (presentation)


Download ppt "PHP: includes MIS 3501 Jeremy Shafer Department of MIS"

Similar presentations


Ads by Google