<?php
/**
 * 芋头CMS - 会员退出
 */
error_reporting(0);
ini_set('display_errors', 0);

require_once dirname(__DIR__) . '/core/lib/session.php';
cmsStartSession();
$_SESSION = [];
$cookies = ini_get('session.use_cookies') ? true : false;
if ($cookies) {
    $params = session_get_cookie_params();
    setcookie(session_name(), '', time() - 3600,
        $params['path'] ?? '/',
        $params['domain'] ?? '',
        $params['secure'] ?? false,
        $params['httponly'] ?? false
    );
}
session_destroy();
header('Location: /member/login.php', true, 302);
exit;
