Function __global->url_is_local
Definitions
sources/urls.php
- Find if the specified URL is local or not (actually, if it is relative). This is often used by code that wishes to use file system functions on URLs (the software will store such relative local URLs for uploads, etc).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $url | URLPATH | No | No | required parameter | N/A | N/A | The URL to check |
Returns
- Whether the URL is local
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find if the specified URL is local or not (actually, if it is relative). This is often used by code that wishes to use file system functions on URLs (the software will store such relative local URLs for uploads, etc).
*
* @param URLPATH $url The URL to check
* @return boolean Whether the URL is local
*/
function url_is_local(string $url) : bool
* Find if the specified URL is local or not (actually, if it is relative). This is often used by code that wishes to use file system functions on URLs (the software will store such relative local URLs for uploads, etc).
*
* @param URLPATH $url The URL to check
* @return boolean Whether the URL is local
*/
function url_is_local(string $url) : bool

