Skip to main content

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

<body>
<div><?php include('header.php');?
></div>
<div><?php include('menu.php');?
></div>
<div><?php include($page_content);?
></div>
<div><?php include('footer.php');?
></div>
</body>

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

<?php
<h1> your company name </h1>
?>

==================
menu.php
<?php
<a href="#" >home</a>
?>

=======

footer.php

<?php
<h1> your company name </h1>
?>

===== make your content file ===
home_.php
<?php
<h1> welcome your company name </h1>
?>

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


run your home.php

you see your header,menu,content and
footer part

Comments

Popular posts from this blog

Connection Information To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Tech Easy Solutions Connection Information To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.  WordPress 5.2.3 hosted on Linux server  need file permission  sudo chown -Rf www-data.www-data  /www/html/worpdressdir change in wp-config

Shopify fully custom contact section block on home page

Tech Easy Solutions Shopify fully custom contact section block on home page <section class="contact-information" >       <!--<div class="left-shape">         <img src="images/left-shape.png" class="img-fluid">       </div>-->       <div class="container c-container">         <div class="row">           <div class="col-lg-6 col-md-6 col-sm-12 col-12">             <div class=" contact-us">                         {% form 'contact' %}                       {% if form.posted_successfully? %}                        <center> <p class="note form-success">                   ...

How to delete Torrent power account

Sanjay Tech solutions 3 easy tips to delete torrent power account  Step 1 : login in to your account Step 2 : click on more profile settings Step 3 : you see red button with deactivate account click then enter your password Your account deactivate