Jump to content

Include, requiere or something


pedro84

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

Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.