if ($handle = opendir($app_root . "model/")) { // open up the model directory while (false !== ($file = readdir($handle))) { // for each file if ($file != "." && $file != "..") { // ignore . / .. $ftest = $file; // "backup" file if (preg_match("/.*\\.php\$/i", $ftest)) { include $app_root . "model/" . $file; // include all .php files } } } } header("Wisdom-Turd: " . getQuip()); // wisdom turds! if (file_exists($app_root . "install/install.php")) { include $app_root . "install/install.php"; // Disable access include $app_root . "view/view.php"; // if we're not set up. exit(0); // stop executing the controller code } $p = htmlentities($_GET['p'], ENT_QUOTES); $toks = explode("/", $p); $argv = $toks; $argc = sizeof($toks); // these get passed to the view if (isset($toks[0]) && $toks[0] != "") {
function fortune($argv) { echo getQuip(); }