Answer the question
In order to leave comments, you need to log in
Why doesn't session_start() take parameters?
PHP 5.6. openserver.
The function, as I understand it, ignores the parameters passed to it - an associative array with options.
session_start([
'save_path' => JDSys::ware('tmp_sess', true), // JDSys::ware() возвращает полный путь к директории с временными файлами сессии,
'name' => 'CONST', // ключ к имени временной сессии в куках,
'read_and_close' => true, // прочитать и не блокировать файл сессии.
]);
this code, for some reason, does not work: the session file is stored in the server's temporary directory, the key in the cookie is PHPSESSID, and the session file is blocked and overwritten. session_save_path(JDSys::ware('tmp_sess', true)); // работаю с сессией в папке с временными сессиями,
session_name('CONST'); // индекс сессии в куки - CONST,
session_start();
session_write_close(); // записываю данные сессии в файл и снимаю с блокировки.
then everything goes as planned. Answer the question
In order to leave comments, you need to log in
look in the dock, from which version the function began to accept the options parameter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question