CakeFest 2024: The Official CakePHP Conference

Yaf_Request_Abstract::setBaseUri

(Yaf >=1.0.0)

Yaf_Request_Abstract::setBaseUri设置基础 URI

说明

public Yaf_Request_Abstract::setBaseUri(string $uir): bool

设置基础 URI,在路由时使用基础 URI,在路由阶段,请求 URI 用于路由请求,而基础 URI 用户跳过请求 URI 的前置部分(基础 URI)。 也就是说,如果请求 URI 是 a/b/c,然后设置基础 URI 为 “a/b”,则路由阶段只会使用“/c”

注意:

一般不需要设置,Yaf 会自动判断。

参数

uir

基础 URI

返回值

bool

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top