php - Unable to Set Cookie Expiration Time on LocalHost -
i writing cookie , trying set expiration time in localhost. however, showing ending time "when browsing session ends"
here code
$domain = ($_server['http_host'] != 'localhost') ? $_server['http_host'] : false; setcookie('rememberme', $cookie, time()+86400*7, '/', $domain, false);
can please me on why facing issue?
this causing cookie destroyed every time close browser.
i able fix issue myself. there other issue in code. apologies inconvenience.
Comments
Post a Comment