valid_url

function valid_url

valid_url($url, $absolute = FALSE)

Verifies the syntax of the given URL.

This function should only be used on actual URLs. It should not be used for Drupal menu paths, which can contain arbitrary characters. Valid values per RFC 3986.

Parameters

$url: The URL to verify.

$absolute: Whether the URL is absolute (beginning with a scheme such as "http:").

Return value

TRUE if the URL is in a valid format.

Related topics

File

includes/登录查看完整内容