1 / 9

Chapter 3

Chapter 3. Creating Dynamic Web Sites Part 1. Large Sites. ”complex sites demand compartmentalization of some HTML or PHP code”. Require and Include. r equire(‘ filename.php ’); r equire_once (‘ filename.php ’); include(‘ filename.php ’); include_once (‘ filename.php ’);.

hoshi
Télécharger la présentation

Chapter 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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://cscdb.nku.edu/csc301/frank/ch03/index.html • ch03\index.html

  7. index.php • Script 3.4 on page 82 • http://cscdb.nku.edu/csc301/frank/ch03/index.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

More Related