Topic: Use PHP to show 'header.php' & 'footer.php

I have tried the simple php include at the top and bottom but the code doesnt seem to work and comes up with errors.

Parse error: syntax error, unexpected '<' in /www/110mb.com/m/a/p/o/f/o/x/f/mapofoxford/htdocs/forum/index.php  on line 369

i have checked the code around there and it seems fine.

Could anyone show me how to use the php include function within this script.

Re: Use PHP to show 'header.php' & 'footer.php

Now I can't help you because I don't now what problem you are solving and I don't see the code. Describe it in details, please. And take a look at this topic: http://punbb.informer.com/forums/topic/ … e-website/. Is it what you want?

3 (edited by jeddenton338 2010-04-23 19:32)

Re: Use PHP to show 'header.php' & 'footer.php

Okay in more detail.

I would like to use the PHP include function at the top and bottom of everypage to include a header and footer that i have already created for use with the rest of my site (http://weliveinoxford.co.cc).

When i place the code on the page this error comes up

Parse error: syntax error, unexpected '<' in /www/110mb.com/m/a/p/o/f/o/x/f/mapofoxford/htdocs/forum/index.php  on line 369

You can view the code here : http://weliveinoxford.co.cc/forum/forumindex.phps
You can view the page here : http://weliveinoxford.co.cc/forum/forumindex.php

The forum can be viewed here : http://weliveinoxford.co.cc/forum/
(the live forum will not show any errors as i have put the original index file back online)

Re: Use PHP to show 'header.php' & 'footer.php

require FORUM_ROOT.'footer.php';

<?php include("includes/footer.php"); ?>

should be

require FORUM_ROOT.'footer.php';

include("includes/footer.php"); ?>