File Structure

index.php
pagename.php
pagename2.php
- inc/config.php
- inc/functions.php
- inc/header.php
- inc/nav.php
- inc/sidebar.php
- inc/footer.php
- inc/footer-js.php
- css/
- js/
- images/

pagename.php

<?php
include( "inc/config.php" );
include( "inc/functions.php" );
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $page_title; ?></title>
<?php include("inc/header.php"); ?>
</head>
<body>
<?php include("inc/nav.php"); ?>
<div id="main">
 <div class="container">
 <div class="row">
 <div class="col-lg-9 text-center">
 <h1><?php echo $page_title; ?></h1>
 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
 </div>
 <div class="col-lg-3 text-center">
 <?php include("inc/sidebar.php"); ?>
 </div>
 </div>
 </div>
</div>
<?php include("inc/footer.php"); ?>
<?php include("inc/footer-js.php"); ?>
</body>
</html>

inc/config.php

<?php

switch ( $_SERVER[ "SCRIPT_NAME" ] ) {
 case "/pagename.php":
 $page_title = "Page Name";
 break;

 case "/pagename2.php":
 $page_title = "Page Name 2";
 break;

 default:
 $page_title = "Unnamed";

}

$base_url = "https://www.imnobby.com";
Related Keywords: Developer, How-to, Solved, PHP, No Framework, Plain Text Website, Flat Template Structure, Sample Code, Easy, Low Tech, No CMS Starter Template, Hard Coded No Database