KidsLovePC Contact Us
  Home   PHP  Graphics ASP  JavaScript   J2EE  HTML  JAVA   Swing   Webtip  Forums  Lyric  Free sheet music  Ringtones

PHP Include Files

Server Side Include(SSI) could save you great amount of time on changing code.It makes changes of just one file propagated throughout the whole web site without having to edit every single file. PHP include also have this function.

Usually, an experienced webmaster keeps an often-changed part as a separate file, use SSI include this file in other files.

How to Use Include Files in PHP

Assume you have a header.html need being include in other files. Use the following code to include header.html:

<?php virtual("/yourpath/header.html") ?>

virtual() function use the absolute path. If header.html is in your web site root, you may use:

<?php virtual("/header.html") ?>

You may also include() function like the following:

<?php include("myfiles.html") ?>

This function uses relative path. Include() is relative to your include_path setting in php.ini file. If you use include(), include() looks first in the same directory where required page is in to see if there is an include file, will include the file by that name in the default include path you've set.

The php.ini file allows you set up an auto_prepend_file and auto_append_file files (header & footer files) which automatically get included on files.

But sometimes you may not want to include a header and footer file on a particular file.

If you use the auto_prepend_file and auto_append_file feature, you do not need to add any additional code to your pages. The PHP engine will automatically add those files.

You can also choose to take advantage of the include_path and put all included files in this specified directories.

PHP Calendar
Comprehensive PHP Web Calendar
Configurable PHP Calendar
PHP Calendar
PHP Image Processing
PHP grahic softwares
PHP create real-time dynamic chart
create antispam image(image verification)
Add water mark to image
PHP Image processing introduction
Add text on Image
Create thumbnail for image
Create image from text on fly
PHP code sample
PHP create dynamic PDF with FPDF
PHP create dynamic PDF with PDFLib
PHP create dynamic PDF with ClibPDF
Improved PHP configurable hit counter
Install phpMyAdmin,MySql, PHP
PhpMyAdmin export/import data
A simple PHP RSS feed reader
PHP include (SSI)
Working with Forms
PHP formmail Generator
Using phpMyAdmin Create Database
Insert Form Data into Database
Retrieve data from Database
Retrieve multiple records
Batch insert text using phpMyAdmin
Using phpMyAdmin insert binary file
Insert binary file using PHP code
Using form insert binary file into MySQL
Retrieve binary file from MySQL
Image hosting business in minutes
Send HTML mail in PHP
Send bulk emails in PHP
Polling/Rating System in PHP
Polling/Rating System in PHP(radio button)
Check visitor's IP address
Check reciprocal link
PHP tutorial
What is PHP?
Install PHP on Windows XP (part1)
Install PHP on Windows XP (part2)
PHP open and closing tags
PHP types
Variables
Constants
Operators(part1)
Operators(part2)
Logic Structures
Include files
Loops
Set cookie and delete cookie
Most often used MySQL functions

 

 

Printer Inkjet A Z lyricsLearn ChineseHome|PHP|Swing|HTML|JavaScript|ASP|JAVA|Forum|WebTip|Contact Us
Copyright © kidslovepc.com All rights reserved(new). Privacy|Copyright
designed by info@kidslovepc.com

Please help us cover the web site maintenance fee.
barcode scanner Thermal Printer credit card machine bar code printer