Answer the question
In order to leave comments, you need to log in
How to make permanent authorization on the site?
Hello. I conjured a little with php.ini. Now the phpsessid cookie is automatically created. How can I make it persist after closing the browser? (I want to make eternal authorization as on all popular sites) Or how to make eternal authorization differently? Of course, I will not write the user id in cookies :)
Answer the question
In order to leave comments, you need to log in
I just googled
// На всякий случай сменим папку для файлов сессии
ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'] .'/sessions/');
/**
*
* Установка времении жизни сессии на 1 месяц.
* Каждый раз при запуске файла эти значения будут переустанавливаться
* так что сессия будет вечной ))
*
*/
ini_set('session.gc_maxlifetime', 3600*24*30);
ini_set('session.cookie_lifetime', 3600*24*30);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question