Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3 Creating Dynamic Web Sites Part 1. Large Sites ”complex sites demand compartmentalization of some HTML or PHP code”.

Similar presentations


Presentation on theme: "Chapter 3 Creating Dynamic Web Sites Part 1. Large Sites ”complex sites demand compartmentalization of some HTML or PHP code”."— Presentation transcript:

1 Chapter 3 Creating Dynamic Web Sites Part 1

2 Large Sites ”complex sites demand compartmentalization of some HTML or PHP code”.

3 Require and Include require(‘filename.php’); require_once(‘filename.php’); include(‘filename.php’); include_once(‘filename.php’);

4 Require and Include *_once( ) version guarantees that the file in question is included only once If an include( ) does not work a warning with be printed in the browser and the script will continue to run. With require( ) an error message is printed and the script stops.

5 Require and Include Naming of included file – filename.inc.php – filename.inc.html

6 Template Script 3.1 on page 79 http://csweb.hh.nku.edu/csc301/frank/ch03/i ndex.html http://csweb.hh.nku.edu/csc301/frank/ch03/i ndex.html ch03\index.html

7 index.php Script 3.4 on page 82 http://csweb.hh.nku.edu/csc301/frank/ch03/i ndex.php http://csweb.hh.nku.edu/csc301/frank/ch03/i ndex.php ch03\index.php

8 header.html Script 3.2 on page 80 ch03\includes\header.html

9 footer.html Script 3.3 on page 81 ch03\includes\footer.html


Download ppt "Chapter 3 Creating Dynamic Web Sites Part 1. Large Sites ”complex sites demand compartmentalization of some HTML or PHP code”."

Similar presentations


Ads by Google