- ⌂ request
- Methods
request::server()
Access server environment variables and other web server information also available from $_SERVER.
Prototype
string server(string $key = NULL, boolean $xss_filter = FALSE)
Parameters
- key - Name of the parameter to retrieve. If NULL or no key is provided, an associative array of all parameters will be returned.
- xss_filter - Optional parameter to enable the cross site scripting filter when available, which converts potentially malicious HTML tags into HTML entities.
Return
If the server parameter exists, the value is returned as a string, including an empty string. Otherwise, FALSE is returned.
Example
// retrieve the value of the requested web address. For example:
// http://www.example.com/script.php?search=test
$request = new \io_comand_web\request();
$request_uri = $request->server('REQUEST_URI');