Saturday, February 24, 2007

PHP file include file in code


A very useful function that PHP provides is the include() function. It gives you the possibility to add the content of one file in another. So, for example if you want to make a very loooong script that does something important and you don't want the page you are working on right now to be filled with all of that content, you can use a IF statement and in that IF statement, you can add:

include("file_path/file_name.extension");

Now, you have one file included in another, and you have just 1 line of code more ......
This is a basic easy function. More to come.........

1 comment:

Anonymous said...

you are linked in goldtips.blogspot.com