PHP: Check if a URL does not contain "http://" or "https://"
<?php | |
if ( ( strpos( $url, 'http://' ) === false ) && ( strpos( $url, 'https://' ) === false ) ) { | |
$url = 'http://' . $url; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment