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?

enter image description here

this causing cookie destroyed every time close browser.

i able fix issue myself. there other issue in code. apologies inconvenience.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -