function url(){
- $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http";
+ $protocol = "http";
+ if(isset($_SERVER['HTTPS']))
+ if($_SERVER['HTTPS'] != "off")
+ $protocol = "https";
+
return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}