PHP - session_set_cookie_params(), lifetime doesn't work
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: As first, I know a lot questions are like mine, but I really don't know what I'm doing wrong... As you might've guessed, I've a PHP script involving sessions. Everything works like a charm, except setting the lifetime of my session. I want to keep the session active for two weeks, but instead my (Chrome) browser says it's set to xpire after the browsing session (and it does). My PHP script: session_name('DSWLogin'); // Naming the session session_set_cookie_params(2*7*24*60*60); // Making the cookie live for 2 weeks session_start(); //