Your Ad Here

 Navigation
Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




 Sponsors
 Links
finance products
gambling sites
domain names
 Downloads
 Misc
Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


Include files

Include files

This tutorial shows how to use the include() function.

The include() function can be used to call an external file from your server or even a different server.

Syntax

The general syntax for a basic include is as follows

<?php include("otherfile.txt"); ?>

This includes a file called otherfile.txt from the same directory on your server.

You can also use it like this

<?php include("http//www.myothersite/otherfile.txt"); ?>

This means you can share the same file on more than one site .

Advantages

Well the advantages are obvious if you are site is growing. Imagine you have a site with 50 pages and you have designed a nice
navigation area but you have forgotten a download link. This would require 50 changes to your site but using an template with an
include file you would change the include file content and all the other pages would be updated .




Books
 Sponsors
 Random Code
Display x amount of links from a MySQL database(database)
A daily MySQL row displayed(database)
Display when a page was last modified(date/time)
 Random Article
  Network
Programming resources
Tutorials directory
Clickbank mall
sell software
Free auctions, low cost stores
UK products
US products
Gambling directory
Sexy free wallpapers
Hosting resources
ASP site
DVD site
Domain names
Dating site
Software directory
Maxi directory
bigarticle : free articles




beginners PHP Copyright © 2004 onwards by beginnersPHP.