Hey guys. I'm trying to make a basic php include setup going with the scotmac site i posted yesterday, but I have run into a small problem. Here's the snippet of code i need help with:
When i type the url to the php file and add "?page=about" or something other than home, it just goes to the home page. I can't get it to include the file i want. Is there anything I'm doing wrong?
PHP:
if(file_exists("includes/pages/$page.html")){
require_once ("includes/pages/$page.html");
} else {
require_once ("includes/pages/home.html");
}
When i type the url to the php file and add "?page=about" or something other than home, it just goes to the home page. I can't get it to include the file i want. Is there anything I'm doing wrong?