diff --git a/web/src/base.php b/web/src/base.php index 8e79848..5ea1c8f 100644 --- a/web/src/base.php +++ b/web/src/base.php @@ -4,6 +4,13 @@ function s($name) { echo $name; } +function urlargs($from = 0) { + $uri = trim($_SERVER['REQUEST_URI'],'/'); + $args = explode('/', $uri); + array_splice($args, 0, $from); + return $args; +} + function tpl($ns, $args=[]) { $ns = str_replace('.','/',$ns); $__tfile = "_templates/$ns.php";