View Single Post
  #5  
Old 04-01-2009, 08:52 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 124,749
Tequila is on a distinguished road
Default RE: Integrate script with php safe includes?

I'm doing this in a beta subdomain, and I'm getting this error now:
Code:
Parse error: syntax error, unexpected $end in /home/enddayne/public_html/beta/header.php on line 248
Line 248 is the end of the header.php file which tells the includes to end the header and input the default page.
PHP Code:
</td><td class="clear" rowspan="4">&nbsp;</td><td class="content"
So do I have to change the way I have the site setup? Put the header and footer in the index file and leave the
PHP Code:
<?php if (isset($_GET['x'])) {
   if (
strpos($_GET['x'], "/")) {
      
$dir substr(str_replace('..'''$_GET['x']), 0strpos($_GET['x'], "/")) . "/";
      
$file substr(strrchr($_GET['x'], "/"), 1);
      if (
file_exists($dir.$file.".php")) {
         include(
$dir.$file.".php");
      } else {
         include(
"world.php");
      }
   } else {
      if (
file_exists(basename($_GET['x']).".php")) {
         include(
basename($_GET['x']).".php");
      } else {
         include(
"world.php");
      }
   }
} else {
   include(
"world.php");
?>
between?