I've used this:
ini_set("session.cookie_lifetime","360000");
session_start();
$_SESSION['valid_user'] = $row['id'];
I don't have acces to the server settings. I want to keep sessions for a very long time alive, like until 2012.
You wouldn't be able to keep up sessions until 2012 anyway. If you want something for a long time, that is where cookies can be put to use. You can take a look at setcookie
function of php for more information.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.