Manjeet kashyap blog
Above single line of php code will help you to get whether current URL over https or http.
<?= ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http'; ?>
No comments:
Post a Comment