I'm trying to include the contact-script.php file on this page of a site: http://www.karmera.de/index.php?go=shop
But it doesn't do anything, and instead, shows the PHP include in the source code. Do you have any ideas as to why?
To give you a better understanding of my site, index.php looks like this:
<?php
$go = "index" ;
if ($_GET["go"])
$go = $_GET["go"] ;
$body = "html/{$go}.html" ;
$head = "html/_{$go}.html" ;
if (!file_exists($body)) {
$body = "html/index.html" ;
}
if (!file_exists($head)) {
$head = "html/_index.html" ;
}
$CONTENT = implode('', file($body)) ;
$HEAD = implode('', file($head)) ;
include "layout.html" ;
?>
The index.php file opens an include to include the content depending on "index.php?go=contact", for example, and the contact.html resides in root/html/contact.html, and it's just the sheer content (in a div). It then includes a www.karmera.de/layout.html file, where there's the design, etc.
As you noticed, there are both .html and .php files, but the thing is - I don't think that should be a problem, as the master file is a .php - so code should execute. To be safe, I even modified htaccess:
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
What do you think the problem is, and how can I solve it?
Also, any other advice is appreciated!
Thank you for your time.