FeediaCo
Active Member
Hello FWS I had a site way back called raversworld and I was taught something in php. Here is what i had in my public_html folder:
index.php
/include
/include/main.php
/include/tos.php
Index.php had the full layout of the site just a blank body for where the text was supposed to go
my question is that the only thing in main.php and tos.php was echo ("this is the text");
but when you clicked on a link you are being brought to index.php?page=main and the text was inserted in the <body> portion of the .php file. I did this about 4 years ago and cant remember how to do it again. all i remember is something along the lines of this
I know its a form of SSI but please bear with me and I hope someone can help
index.php
/include
/include/main.php
/include/tos.php
Index.php had the full layout of the site just a blank body for where the text was supposed to go
my question is that the only thing in main.php and tos.php was echo ("this is the text");
but when you clicked on a link you are being brought to index.php?page=main and the text was inserted in the <body> portion of the .php file. I did this about 4 years ago and cant remember how to do it again. all i remember is something along the lines of this
PHP:
//THIS IS INDEX.PHP
<?php
$page==$page
echo ("
<html>
<body>
");
echo $page
echo ("
more site layout
</body>
</html>
PHP:
//THIS IS MAIN.PHP OR TOS.PHP
<?php
echo ("text will be inserted into the body of the site");
?>
Last edited: