What is the default session time in PHP and how can I
change it?
Answer Posted / rakesh kumar nautiyal
<?php
session_start();
session_cache_expire(15);
$cache_expire = session_cache_expire();
if(!isset($_SESSION['password'])){
$msg = "Your session is expired.Please re enter the
password";
header("Location: index.php?msg=".$msg);
} else {
// remaining code to display the gallery
}
?>
| Is This Answer Correct ? | 44 Yes | 63 No |
Post New Answer View All Answers
When to use self over $this?
What is the use of explode() function?
What is the difference between substr() and strstr()?
Do you know how to get the ip address of the client?
Who created numbers?
What is string in php?
What is composer install?
Which php framework is in demand?
What is the integer?
What are the features of object-oriented programming in php?
Write a program using while loop?
What are php magic methods?
What is polymorphism?
What is the difference between for and foreach?
Write syntax to open a file in php?