Jump to content

[SOLVED] PHP Layout


phrozenflame

Recommended Posts

Without includes, and no frames, not even iframes?

Personally, I do the following

Anything above the content area, that is the same on each page (or a little bit dynamic) I add in
inc_header.php

Anything below the content, I add in inc_footer.php

Including the Div for content

SO my layout is something like this
[b]inc_header.php[/b]
[code]
<html>
<head>
<title><?=$page_title; ?></title>
</head>
<body>

<div id='header'>
</div>

<div id='Links'>
<a href='/'>Home</a>

</div>

<div id='content'>
[/code]

[b]inc_footer.php[/b]
[code]
</div>
<div id='footer'>
Copyright to me
</div>
</body>
</html>
[/code]

[b]Any Page[/b]
[code]
<?php
$page_title = "Page Name";
require("inc_header.php");
?>
This is my website
<?php
require("inc_footer.php");
[/code]
Link to comment
https://forums.phpfreaks.com/topic/32447-solved-php-layout/#findComment-150768
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.