Server Side Includes in PHP Prof. Ami Tusharkant Choksi Assistant Professor, Computer Engg. Dept, C.K.Pithawalla College o...
What is Server Side Includes[1,2]? - Used to to include the contents of one or more files into a web page on a web server....
Example <?php include(“file.php”); test(); echo “testing”; ?> - file.php is having code <?php function test{ print “hello ...
require(“file.php”) <?php require(“file1.php”); test(); echo “testing”; ?> - testing will not be printed as  file1.php not...
References <ul><li>http://en.wikipedia.org/wiki/Server_side_include </li></ul><ul><li>http://www.w3schools.com/PHP/php_inc...
Upcoming SlideShare
Loading in …5
×

SSI

455 views
405 views

Published on

server side includes in PHP

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
455
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SSI

  1. 1. Server Side Includes in PHP Prof. Ami Tusharkant Choksi Assistant Professor, Computer Engg. Dept, C.K.Pithawalla College of Engg. & Tech., Surat.
  2. 2. What is Server Side Includes[1,2]? - Used to to include the contents of one or more files into a web page on a web server. - include() or require() functions for Ssi. - The two functions are identical in every way, except how they handle errors: * include() generates a warning, but the script will continue execution * require() generates a fatal error, and the script will stop - used to create functions, headers, footers, or elements that will be reused on multiple pages
  3. 3. Example <?php include(“file.php”); test(); echo “testing”; ?> - file.php is having code <?php function test{ print “hello world”; }
  4. 4. require(“file.php”) <?php require(“file1.php”); test(); echo “testing”; ?> - testing will not be printed as file1.php not available
  5. 5. References <ul><li>http://en.wikipedia.org/wiki/Server_side_include </li></ul><ul><li>http://www.w3schools.com/PHP/php_includes.asp </li></ul>

×