“网页已过期"PHP 中的 $_SESSIONS [英] "Webpage has expired" $_SESSIONS in PHP
问题描述
在我的网络应用程序中,我使用 $_SESSIONS
但有时,当用户按下退格键时,他会得到:
网页已过期
留言.
为什么会这样?我该怎么做才能避免这种情况?
它还与发送到浏览器的缓存控制指令有关.看看 http://de.php.net/manual/en/session.configuration.php#ini.session.cache-limiter 和 http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings 以了解有关缓存设置的更多信息.
http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings:
回顾为避免页面已过期"警告,请将 session.cache_limiter 设置为私有,并确保使用 POST 方法的任何表单提交到将用户重定向到不同 URL 的中间处理页面.
>
In my web-application I'm using $_SESSIONS
but sometimes, when the users hits the backspace key he gets:
Webpage has expired
message.
Why is this happening? What can i do to avoid this?
It also has to do with the cache control directives sent to the browser. Take a look at http://de.php.net/manual/en/session.configuration.php#ini.session.cache-limiter and http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings to learn more about the cache settings.
http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings:
RecapTo avoid "Page Has Expired" warnings, set session.cache_limiter to private, and make sure that any form using the POST method submits to an intermediate processing page that redirects the user to a different URL.
这篇关于“网页已过期"PHP 中的 $_SESSIONS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!