Skip to content

Instantly share code, notes, and snippets.

@LinuxPhreak
Created November 17, 2014 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LinuxPhreak/2b3f9ea10405d1671a0a to your computer and use it in GitHub Desktop.
Save LinuxPhreak/2b3f9ea10405d1671a0a to your computer and use it in GitHub Desktop.
switches between php pages in a way I don't want
/* user.php may be user.php?foo=bar and I need the if ($actual_url == 'http://' . $website . '/user.php') to work in that case as well. */
<?php
include_once $main . 'includes/left.php';
$website = 'example.com';
$actual_url = 'http://' . $_SERVER[HTTP_HOST] . $_SERVER[REQUEST_URI];
if ($actual_url == 'http://' . $website . '/user.php')
{
include_once $main . 'includes/middle-user.php';
}
else if ($actual_url == 'http://' . $subdomain . '.' . $website . '/' || $actual_url = 'http://' . $website)
{
include_once $main . 'includes/middle.php';
}
include_once $main . 'includes/right.php';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment