选择语言 :

 Core_HttpIO::url

Create a URL from the current request. This is a shortcut for:

echo URL::site($this->request->uri($params), $protocol);

string Core_HttpIO::url( [ string $params = null , array $protocol = null ] )
since
3.0.7
uses
URL::site

参数列表

参数 类型 描述 默认值
$params string Route name null
$protocol array URI parameters null
返回值
  • string
File: ./core/classes/httpio.class.php
public static function url(array $params = null, $protocol = null)
{
    // Create a URI with the current route and convert it to a URL
    return Core::url(HttpIO::uri($params), $protocol);
}