Exemplo n.º 1
0
 static function unsetCookie($sName, $sPath = null, $sDomain = null)
 {
     //add a prefix to avoid conflicts between multiple anwiki instances running on same host
     $sName = self::getCookiesPrefix($sName) . $sName;
     $nExpires = time() - 86400;
     //unset
     if (!$sPath) {
         $sPath = AnwComponent::globalCfgCookiesPath();
     }
     if (!$sDomain) {
         $sDomain = AnwComponent::globalCfgCookiesDomain();
     }
     setcookie($sName, "", $nExpires, $sPath, $sDomain);
     if (isset($_COOKIE[$sName])) {
         unset($_COOKIE[$sName]);
     }
     self::debug("unsetCookie(" . $sName . ") [" . $sPath . " ; " . $sDomain . "]");
 }