Two methods for PHP to support page rollback [go] During development, the information entered when the page is returned due to a form error is often lost. to support page rollback, you can achieve this in two ways.
First, use the Header method to
In the development process, the two methods for PHP to support page rollback often disappear when the page is returned because of a form error. to support page rollback, you can achieve this in two ways.
First, use the Header method to set the
Header ("http/1.1 404 Not Found");
Copy CodeFor the ErrorDocument 404/404.php function in Apache configuration, the
Error_page 404/404.php;
Copy CodeChange into
Error_page 404
How to retain the information that has been filled in after PHP fails to submit the form. This article describes some methods to summarize how to retain the entered information after PHP fails to submit the form. The most common method is to use the
The following describes how to use the header function. The following describes how to use the header function.
No matter how many headers there are on the page, it executes the last one, but it is conditional. for example:Header ('Location: https:/
PHP creates page cache code. The PHP code for creating a page cache is as follows? Phpheader (Expires: Mon, 26Jul199705: 00: 00GMT); header (Cache-Control: no-cache, must-revalidate); header (Pragma: no-cache );? The PHP code for creating a page
: This article mainly introduces the principles and applications of HTTPsessioncookie in PHP. if you are interested in PHP tutorials, refer to it. PHP COOKIE
Cookie is a mechanism for storing data in a remote browser and tracking and identifying
PHP still retains the information filled in after it fails to submit the form
Header ('cache-control: private, must-revalidate'); // supports page jump back
2. use the session_cache_limiter method.
Disable IE and Firefox cache using php. I found a lot of methods in the network speed, and finally solved the problem. The simplest method is to add the meta tag METAHTTP-EQUIVCache-ControlCONTENTno-cache, no-store, must-revalidateME found many
This article mainly introduces the use of HTTPCache in the Symfony2 framework, and analyzes the use skills related to the HTTP Cache of the Symfony framework in combination with the instance form. if you need it, refer to the example in this article
(To solve the problem that the content entered after an error is returned when the form is submitted disappears, only for the PHP website) when submitting the form information, you will encounter a problem that when the user fills in and submits the
We can use the header to control the HTML page using the META tag and PHP program. For example:
The code is as follows
Header (' cache-control:max-age=86400, Must-revalidate ');//24 hours
Header (' last-modified: '. Gmdate (' d, D M Y h:i:s '). '
This article to the students to introduce the PHP submission form failed after the failure of how to retain the information of the summary of some methods, the most commonly used is the use of caching methods, this method if the speed of the network
Symfony2 Framework Learning Notes HTTP cache usage details, SYMFONY2 study notes
This example describes the Symfony2 framework HTTP cache usage. Share to everyone for your reference, as follows:
The nature of rich Web applications means their
During the development process, the information filled in when the page is returned due to a form error is often lost. to support page jump, you can use two methods.
During the development process, the information filled in when the page is returned
Https://www.cnblogs.com/cgzl/p/9165388.htmlSome of the preparatory knowledge required for this article can be seen here: http://www.cnblogs.com/cgzl/p/9010978.html and http://www.cnblogs.com/cgzl/p/9019314.htmlTo establish a Richardson maturity
One, for static pages (which are set by meta tags): expires is used to set the expiration time of a webpage and must be reloaded from the server once it expires. Time must use GMT format - http-equiv= "Expires" content= "0"/>or set by pragma
pragma and No-cacheUsed to define the page cache and not cache pages (to speed up some browsers will cache the pages viewed by the viewer, as defined below, browsers generally do not cache pages, and browsers cannot browse offline.)Its function is
This article describes some methods to summarize how to retain the entered information after PHP fails to submit the form. The most common method is to use the cache method. This method may cause problems if the network speed is slow, the best way
This article will introduce some methods to summarize how to retain the entered information after PHP fails to submit the form. The most common method is to use the cache method. This method may cause problems if the network speed is slow, the best
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.