php include??

Submitted by Anonymous on Thu, 02/19/2009 - 17:40
Written by

hi, i currently use iframe to display the forum on my site. Could you tell me how i would include the forum using php on my page.


not sure if this would work but you could try

//yourcode here

//this will include the forum
include("[i]link to your forum here e.g. forum/index.php[/i]";

// your other code here


this is only if your webpage is php! if so stop here!

if it is HTML do these steps

add this code were you want your forum:

include("[i]link to your forum here e.g. forum/index.php[/i]";

then save the file as php!

eg if it was home.html change it to home.php
then make that html file again but only add this code to it!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<SCRIPT language="JavaScript">
window.location="add url here";


where it says add url here put the php file you just made.

this is so if you have made it using html you dont have to go throgh all the links again changing it from filetype.html to filetype.php

PHP include usually doesn't allow any URL's anymore (due to security issues). Also, this will be a very dirty hack leaving you with totally garbled HTML.

The best strategy is to make a new template for your website.

or you could make a new template for the forum it shouldent be that hard to do ...

That's what I mean. :)

shawd1 if you need help making a template ill help ya, but you reli need to upgrade your server for i surgest it is £9 for an entire year!

plus i didnt mean

i ment


Simply including index.php like that in your page will not work.

oh yea :P :S just stay with the iframe or make a new template