芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/www/midiatech/vendor/slim/views/TwigExtension.php
urlFor($name, $params); } public function site($url, $withUri = true, $appName = 'default') { return $this->base($withUri, $appName) . '/' . ltrim($url, '/'); } public function base($withUri = true, $appName = 'default') { $req = Slim::getInstance($appName)->request(); $uri = $req->getUrl(); if ($withUri) { $uri .= $req->getRootUri(); } return $uri; } public function currentUrl($withQueryString = true, $appName = 'default') { $app = Slim::getInstance($appName); $req = $app->request(); $uri = $req->getUrl() . $req->getPath(); if ($withQueryString) { $env = $app->environment(); if ($env['QUERY_STRING']) { $uri .= '?' . $env['QUERY_STRING']; } } return $uri; } }