$m = isset($_GET['m']) && trim($_GET['m']) ? trim($_GET['m']) : 'index'; $REQUEST_URI = $_SERVER['REQUEST_URI']; if (is_file($REQUEST_URI) && file_exists($REQUEST_URI)) { include($REQUEST_URI); } elseif (file_exists(CTL_DIR . 'content/' . $m . '.php')) { include(CTL_DIR . 'content/' . $m . '.php'); } else { exit('error url'); }