14 lines
315 B
PHP
14 lines
315 B
PHP
<?php
|
|
function get_protocol() {
|
|
$protocol = "http";
|
|
if ( (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']
|
|
&& $_SERVER['HTTPS'] !== 'off') ||
|
|
$_SERVER['SERVER_PORT'] == 443) )
|
|
$protocol = "https";
|
|
return $protocol."://";
|
|
}
|
|
function get_base_url() {
|
|
return get_protocol().$_SERVER['HTTP_HOST'];
|
|
}
|
|
?>
|