Jump to content


Photo

Include, requiere or something


  • Please log in to reply
1 reply to this topic

#1 pedro84

pedro84
  • Members
  • PipPipPip
  • Advanced Member
  • 85 posts

Posted 22 October 2006 - 05:52 PM

Hello Again:)


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

Source [part]:

<div id="bckg"></div>

<div id="left">

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

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



#2 Design

Design
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts
  • LocationThe Computer Chair

Posted 22 October 2006 - 10:48 PM

Place a table sort of like this:
---------------------------
|_______Header_________|
| M|                              |
| E|          Content          |
| N|                              |
| U|                              |
|  |____________________
|_______Footer__________|

And use either:
<?php include('example.php'); ?>
OR
<?php require('example.php'); ?>
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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users