I decided I was going to use the tutorial for my website here. I made the "pages" folder as the tutorial said and I copied the code into index.php directly from the tutorial as follows:
CODE
<?php $page = basename($_SERVER['QUERY_STRING']);
include(’header.php’);
if(!$page){
include(’pages/main.php’);
} else {
if(file_exists(’pages/’.$page.’.php’)){
include(’pages/’.$page.’.php’);
} else {
echo(’This page does not exist!’);
}
}
include(’footer.php’);
?>
include(’header.php’);
if(!$page){
include(’pages/main.php’);
} else {
if(file_exists(’pages/’.$page.’.php’)){
include(’pages/’.$page.’.php’);
} else {
echo(’This page does not exist!’);
}
}
include(’footer.php’);
?>
However, when I uploaded the files, the index page didn't load and instead gave the following error:
Parse error: syntax error, unexpected T_STRING in /home/garnetjb/public_html/rouge/index.php on line 10
I have only worked with basic includes up to this point and I don't know a lot about PHP, so I'm not sure how to fix this or what the error means. Any help would be greatly appreciated.