current_url()
function current_url(): string
Description
Get the current URL of the web page.
Return Value
| Type | Description |
|---|---|
| string | The current URL as a string. |
Example Usage
PHP
echo current_url();
// Output: http://example.com/current_pagefunction current_url(): string
Get the current URL of the web page.
| Type | Description |
|---|---|
| string | The current URL as a string. |
echo current_url();
// Output: http://example.com/current_page