function get_current_base_url() { $url = \Core\Tool::isHTTPS() ? 'https://' : 'http://'; $url .= $_SERVER['SERVER_NAME']; $url .= $_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443 ? '' : ':' . $_SERVER['SERVER_PORT']; $url .= dirname($_SERVER['PHP_SELF']) !== '/' ? dirname($_SERVER['PHP_SELF']) . '/' : '/'; return $url; }
/** * Remove the cookie * * @access public */ public function deleteCookie() { setcookie(self::COOKIE_NAME, '', time() - 3600, BASE_URL_DIRECTORY, null, Tool::isHTTPS(), true); }