Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set up php the page cannot be backed up

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "how to set up php page can not go back", the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "how to set up php page can not go back" this article bar.

Php Set the page can not be backward method: 1, open the corresponding PHP page;2, by setting the code "header("Cache-control:no-cache,no-store, must-invalidate ");" to prohibit the page backward.

Operating environment: Windows 7, PHP 7.1, DELL G3

How does php set up pages that can't go backwards?

PHP header() Forbidden page back

The code is as follows:

header("Cache-control:no-cache,no-store,must-revalidate");header("Pragma:no-cache");header("Expires:0");header('Location:http://www.xxx.com');

Related Introduction:

The header() function sends the original HTTP header to the client.

It is important to realize that the header() function must be called before any actual output is sent (in PHP 4 and later, you can use output caching to solve this problem):

syntax

header(string,replace,http_response_code) The above is "php how to set the page can not go back" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report