php master page code free

how to make master page in php
easy way to make master page in php

this work same like asp .net

first defined your header part
then defined your menu part
then defined your footer part

 make separate php file

 header.php
menu.php
footer.php

put your content in a file
==============
master.php

<?php include('header.php');?
>

<?php include('menu.php');?
>

<?php include($page_content);?
>

<?php include('footer.php');?
>

=============
header.php

<?php

your company name

?>

==================
menu.php
<?php
home
?>

=======

footer.php

<?php

your company name

?>

===== make your content file ===
home_.php
<?php

welcome your company name

?>

====== home.php  ====
<?php
$page_content = ‘home_.php’;
include(‘master.php’);
?>

run your home.php

you see your header,menu,content and
footer part

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s