SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $page = $_GET["page"];        
  2. $page = ucfirst($page); //Schreibt den ersten Buchstaben groß.
  3.         loadClass($page, "sites", ".site.php"); //Läd die Klasse: /sites/$page.site.php
  4.        
  5.         $pageInstance = null;
  6.         if (class_exists($page)){ //Wenn es die Klasse gibt, erzeuge sie
  7.                 $pageInstance = new $page();
  8.         } else { //Sonst lade die Klasse Error404 und sag: Das ist die Aktuelle Klasse
  9.                 loadClass("Error404", "sites", ".site.php");
  10.                 $pageInstance = new Error404();
  11.         }
  12.  
  13.         print $pageInstance->toHTML();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top