Include File

Written by @m_k_amin 20 November 2012

It is boring and confusing to write all codes in a one page; and in addition, you may need similar codes or functions within different pages. The way is to separate them to another file and call the file from the current page. This script shows how to create the header and footer of the page in another file and add them to the current page. The included file is in the attachment!.

Code Snippet:

                                                
                                                <!-- this script is provided by https://www.phpfreecode.com coded by: Kerixa Inc. -->
<!-- This Script is from www.phpfreecpde.com, Coded by: Kerixa Inc-->

<table style="width: 100%">
<?php
include 'included.php';
DrawHeader();

echo('
	<tr>
		<td style="border-top-style: solid; border-top-width: 1px; text-align: center; background-color: #C1FFC9;">
		<span style="font-family: \'Times New Roman\', Times, serif">
		<span style="font-size: 40pt"><br><span style="color: #322DEA">The Main 
		Content</span><br style="color: #322DEA"><span style="color: #322DEA">&nbsp;of 
		This Page</span></span><br style="font-size: 40pt; color: #322DEA">
		<span style="font-size: 40pt"><span style="color: #322DEA">is Here!</span><br>
		<br></td>
	</tr>
');

DrawFooter();
?>
</table><div align="center" >
<br><font face="Tahoma"><a target="_blank" href="http://www.phpfreecode.com/"><span style="font-size: 8pt; text-decoration: none">PHP Free Code</span></a></font></div>
<a target='_blank' href='https://www.phpfreecode.com' style='font-size: 8pt; text-decoration: none'>Php Best Codes</a>                                                
                                            

Example:


About @m_k_amin

This user is pending a biography.

M

Comments


Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

TRENDING POST
1
2
3
4
5
VISITORS
Online Users: 12
Recent Members: grkkid, Manaakividuinfo.com, karticksv, sava, tinatina
advertisement 2