方法名 | 功能 | 输入示例 |
Request Information | ||
getMethod() | Request对象 | Returns sfRequest::GET or sfRequest: ![]() |
getMethodName() | Request对象名 | 'POST' |
getHttpHeader('Server') | 给定HTTP头的值 | 'Apache/2.0.59 (Unix) DAV/2 PHP/5.1.6' |
getCookie('foo') | 指定名称Cookie的值 | 'bar' |
isXmlHttpRequest()* | 是否是AJAX请求? | true |
isSecure() | 是否是SSL请求 | true |
Request Parameters | ||
hasParameter('foo') | 参数是否在请求中有 | true |
getParameter('foo') | 指定参数的值 | 'bar' |
getParameterHolder()->getAll() | 所有请求参数的数组 | |
URI-Related Information | ||
getUri() | 完整URI | 'http://localhost/myapp_dev.php/mymodule/myaction' |
getPathInfo() | 路径信息 | '/mymodule/myaction' |
getReferer()** | 来自那里? | 'http://localhost/myapp_dev.php/' |
getHost() | 主机名 | 'localhost' |
getScriptName() | 前端控制器路径与名称 | 'myapp_dev.php' |
Client Browser Information | ||
getLanguages() | 可接受语言的列表 | Array( [0] => fr [1] => fr_FR [2] => en_US [3] => en ) |
getCharsets() | 可接受字符集的列表 | Array( [0] => ISO-8859-1 [1] => UTF-8 [2] => * ) |
getAcceptableContentTypes() | 可接受内容类型数组 |
欢迎光临 时时商务社区 (http://bbs.4435.cn/) | Powered by Discuz! X3.2 |