Home > php教程 > php手册 > 为什么我在点击浏览器的后退按钮后,所有字段的信息都被清空了?

为什么我在点击浏览器的后退按钮后,所有字段的信息都被清空了?

WBOY
Release: 2016-06-21 09:05:14
Original
953 people have browsed it

按钮|浏览器

问:为什么我在点击浏览器的后退按钮后,所有字段的信息都被清空了?

答:这是由于你在你的表单提交页面中使用了 session_start 函数。该函数会强制当前页面不被缓存。解决办法为,在你的 Session_start 函数后加入 header("Cache-control: private"); 注意在本行之前你的PHP程序不能有任何输出。



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template