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
What is the difference between php and java?
Which function is used to strip whitespace?
How we load all classes that placed in different directory in one php file , means how to do auto load classes.
Why would we use === instead of ==?
How many types of php frameworks are there?
Could we start a variable with number like $4name?
What is laravel php?
How can you increase the maximum execution time of a script in php?
What is member function?
Is PHP an open source software?
How can we submit from without a submit button?
What is csrf verification?
What is php simple definition?
How to store the uploaded file to the final location?
Explain what is the difference between $var and $$var?