Php includes allows you to maintain your site more easily. It’s like pasting another file into one page – something like iframe, but much more simple and nice.
- Ok, open a blank notepad. Put these codes on the file;
<?php
echo “Hello! This is from another.php”;
?>
echo “Hello! This is from another.php”;
?>
Save the file as another.php
- Now, open another new blank notepad and place this code on the file;
<?php
echo “This is tadaa.php file<br/>”;
include(“another.php”);
?>
echo “This is tadaa.php file<br/>”;
include(“another.php”);
?>
And save the file as tadaa.php
- Try and preview the tadaa.php file. You can see the text you you wrote on the another.php is included ;)
Take notice that you can only do this PHP include in a .php file extension, and you can only view .php files on a server.
Comment?
»
Leave a comment

ajwa . Naj . Wawa . 27 . 











