Jump to content

Archived

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

pedro84

Include, requiere or something

Recommended Posts

Hello Again:)


I have splitted my source for the files:
header.php
content.php
footer.php
menu.php

Source [part]:

[code]<div id="bckg"></div>

<div id="left">

<div id="menu">
<ul class="menu_t">
<li class="menu_item_lefth">&nbsp;Michael-Schenker.com</li>[/code]

My source is div based.


I have serious problems with my template. I don't know where I have to include files to make pages with different content. Do I have to put my tamplate in index.php? Or can it be juest like I've splitted it?
header.php
content.php
footer.php
menu.php?

I have read many tutorials but I haven't found what I'm looking for [:) U2]


Thanks in advance for help
Greetings
Pedro

Share this post


Link to post
Share on other sites
Place a table sort of like this:
---------------------------
|_______[sup][u]Header[/u][/sup]_________|
| M|                              |
| E|          Content          |
| N|                              |
| U|                              |
|  |____________________
|_______[u][sup]Footer[/sup][/u]__________|

And use either:
[code]<?php include('example.php'); ?>[/code]
OR
[code]<?php require('example.php'); ?>[/code]
to put the pages into those areas.
the require() statement is better, because if an error occurs, it stops loading that page, instead of loading a faulty page.

Share this post


Link to post
Share on other sites

×

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.