getRequestUri is a PHP function that is used to get the URI (Uniform Resource Identifier) of the current request. The URI is the part of a web address that specifies the resource being requested (e.g. /index.php, /products, /about-us, etc.).
Example 1: Suppose the URL of the current page is http://example.com/products, then the getRequestUri function will return the string /products.
Example 2: Suppose the URL of the current page is http://example.com/index.php?page=about-us, then the getRequestUri function will return the string /index.php?page=about-us.
This function is a part of the PHP core library and is therefore available in all PHP installations.
PHP Request::getRequestURI - 7 examples found. These are the top rated real world PHP examples of Request::getRequestURI from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples.