session.cookie_secure = 1cookie
若是開啓則代表你的cookie只有經過HTTPS協議傳輸時才起做用。session
$is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';spa
if ($is_https) {orm
ini_set('session.cookie_secure', TRUE);ci
}get
$prefix = ini_get('session.cookie_secure') ? 'SSESS' : 'SESS';hash
session_name($prefix . substr(hash('sha256', $session_name), 0, 32));it