How can I get protocol and domain in php
$ protocol = stripos ($ _ SERVER ['SERVER_PROTOCOL'], 'https') === true? 'https: //': 'http: //';
$ domain = $ _SERVER ['HTTP_HOST'];
How can I get protocol and domain in php
$ protocol = stripos ($ _ SERVER ['SERVER_PROTOCOL'], 'https') === true? 'https: //': 'http: //';
$ domain = $ _SERVER ['HTTP_HOST'];
This works correctly
$ protocol = stripos ($ _ SERVER ['SERVER_PROTOCOL'], 'https') === true? 'https: //': 'http: //';
$ domain = $ _SERVER ['HTTP_HOST'];