lithium\action\Request::_base()
Find the base path of the current request.
Parameters
-
string
$base
The base path. If
null
,'PHP_SELF'
will be used instead.
Returns
stringSource
protected function _base($base = null) {
if ($base === null) {
$base = preg_replace('/[^\/]+$/', '', $this->env('PHP_SELF'));
}
$base = trim(str_replace(array("/app/webroot", '/webroot'), '', $base), '/');
return $base ? '/' . $base : '';
}