Google

Monday, November 19, 2007

The Include Function in PHP5

The include function takes a file name and simply inserts that file's contents into the script that calls used the include function.

Well, first of all, this means that you can type up a common header or menu file that you want all your web pages to include. When you add a new page to your site, instead of having to update the links on several web pages, you can simply change the Menu file.

 include('header.php');

The include command simply takes all the text that exists in the specified file and copies
it into the file that uses the include function. Include is quite useful when you want
to include the same PHP, HTML, or text segment on multiple pages of a website. The include
function is used widely by PHP web developers.



1 comment:

Muhammad Azeem said...

This is a nice article..
Its easy to understand ..
And this article is using to learn something about it..

c#, dot.net, php tutorial, Ms sql server

Thanks a lot..!