Search Results
session_cache_expire () returns the current setting of session.cache_expire. The cache expire is reset to the default value of 180 stored in session.cache_expire at request startup time. Thus, you need to call session_cache_expire () for every request (and before session_start () is called).
- Definition and Usage
- Example 1
- Example 2
- Example 3
Sessions or session handling is a way to make the data available across various pages of a web application. The session_cache_expire()function is used to get the current cache expire.
Following example demonstrates the usage of the session_cache_expire()function. One executing the above html file it will display the following message − The number in the message keeps changing based on the number of times you refresh the page without closing the browser. For example, if you refresh 10 times, then the same page displays the follow...
Following is another example of this function, in here we have two pages from the same application in the same session. session_page1.htm This will produce the following output − On clicking on Nextthe following file is executed. session_page2.htm This will produce the following output −
You can set session expire using this function as shown below − One executing the above html file it will display the following message −
PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8 session_cache_expire - Get and/or set current cache expire Manual Code Examples
The cache expire is reset to the default value of 180 stored in session.cache_expire at request startup time. Thus, you need to call session_cache_expire for every request (and before session_start is called).
Description int session_cache_expire ( [int new_cache_expire] ) session_cache_expire () returns the current setting of session.cache_expire. The value returned should be read in minutes, defaults to 180. If new_cache_expire is given, the current cache expire is replaced with new_cache_expire. The cache expire is reset to the default value of 180 stored in session.cache_limiter at request ...
Get and/or set current cache expire
People also ask
What is PHP session cache expire function?
What does session_cache_expire() do?
How to reset cache expire?
What does cache_expire return?
Définition et utilisation Les sessions ou la gestion de session sont un moyen de rendre les données disponibles sur différentes pages d'une application Web. le session_cache_expire () La fonction est utilisée pour obtenir l'expiration du cache actuel.
