include html from another file?

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Howto? I want to include gamelist.html on index.html. phpBB uses <!-- INCLUDE overall_header.html --> but that is a comment but it works for phpBB but not on my page.
 

supajason

Member
Messages
288
Reaction score
2
Points
18
you would need to change your website to PHP and then use the include function. I would take a guess that is how PHPBB did it.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
PhpBB has it like this way:

HTML:
<!-- INCLUDE overall_header.html -->
some content bla bla bla
<!-- INCLUDE overall_footer.html -->

And is written in an html file. But I tested an SSI thing, That would probably only work on the x10 server right?
 

ryoko126

New Member
Messages
207
Reaction score
0
Points
0
Do you mean a php Include Statement? If so, you have to put a code like this where you want the content to show up. That is, ASSUMING I'm understanding correctly.

<?php
include($_SERVER['DOCUMENT_ROOT']."/gamelist.php");
?>

Be sure on the gamelist page you only put the php or html of the content itself, not the background, css or anything like that.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
I renamed the index to .shtml and used an SSI command now. Dreamweaver 8 + shtml = bad idea. The design thing mess up. How do I fix it? I managed including the file with SSI anyway. Eh WTH I use php instead...
 
Last edited:
Top