BLACKSITE
:
216.73.216.62
:
147.93.18.13 / vinyasaweddings.com
:
Linux srv667811 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
:
/
var
/
www
/
shrikrishna
/
core
/
Upload File:
files >> /var/www/shrikrishna/core/Router.php
<?php class Router { protected $routes = []; protected $url; public function __construct($url) { $this->url = trim($url, '/'); // clean the URL } public function get($route, $action) { $route = trim($route, '/'); $this->routes['GET'][$route] = $action; } public function dispatch() { require_once 'controllers/HomeController.php'; $method = $_SERVER['REQUEST_METHOD']; $route = $this->url; if (isset($this->routes[$method][$route])) { $action = $this->routes[$method][$route]; list($controllerName, $methodName) = explode('@', $action); $controller = new $controllerName(); if (method_exists($controller, $methodName)) { $controller->$methodName(); } else { echo "Method $methodName not found!"; } } else { echo "404 Not Found"; } } }