public function start() { $controller = $this->controller; //controller $action = $this->action; //action if (!@(include_once 'controllers/' . strtolower($controller) . '.php')) { header("Location: " . BASE_URL . "error"); } $run = new $controller(); include_once 'model/model.php'; $model = new Model(); $readonly = $model->is_readonly_app($_GET["data_id"]); $_SESSION["readonly"] = $readonly; if (method_exists($run, $action)) { $run->{$action}(); } else { header("Location: " . BASE_URL . "error"); } }