CI is not the session of the original session, it is all of my previous cookie based session, in addition, CI can be selected according to the user configuration will be stored in the database session, I like this function, there is "flash data"
This involves 4 kinds of header types:
Last-modified (last modification time);
Expires (valid term);
Pragma (compiling instructions);
Cache-control (cache control);
The first three headers belong to the HTTP1.0 standard. The header last-modified
PHP advanced application header () function setting browser cacheFour header types are involved:Last-Modified (Last modification time );Expires (validity period );Pragma (compilation instructions );Cache-Control (Cache Control );The first three
When using the Baidu tool for a small test, we were prompted that we had to set the static content cache time. I had no server permission to operate on myself and had to start from other aspects, after I searched for php, I found that I could use
This article describes how to set the cache time for static content in php. it involves the application techniques for parameters in the header function and is of great practical value, for more information about how to set the cache time for static
PHP advanced application learning notes: Use the header () function to set browser cache. four header types are involved:
Last-Modified (Last modification time );
Expires (validity period );
Pragma (compilation instructions );
Cache-Control (Cache
The time in PHP has 2 formatting functions: Date () and Gmdate (), which are described in the official documentation:
Date--Formatting a local time/date
Gmdate--Formats a GMT/UTC date/time and returns Greenwich Mean Time (GMT).
For example, we
PHP Advanced Application Header () function set browser cache
This involves 4 kinds of header types:
Last-modified (last modification time);
Expires (validity period);
Pragma (compiling instructions);
Cache-control (cache control);
The first three
PHP advanced application header () function sets browser cache. four header types are involved: Last-Modified (Last modification time), Expires (validity period), and Pragma (compilation instructions ); cache-Control (Cache Control); the first three
Checkdate: Verify that the date is correct.
Date: format the server time.
Strftime: format the server time locally.
Getdate: Get the time and date information.
Gettimeofday: Get the current time.
Gmdate: Get the current time difference from
PHP advanced application learning notes: Use the header () function to set browser cache. four header types are involved:
Last-Modified (Last modification time );
Expires (validity period );
Pragma (compilation instructions );
Cache-Control (Cache
Php sets the static content cache time, and php sets the static cache. Php sets the static content cache Time. php sets the static cache. this example describes how php sets the static content cache time. Share it with you for your reference.
PHP uses the header () function to set the browser cache code. Four header types are involved: Last-Modified (Last modification time); Expires (validity period); Pragma (Compilation instruction); Cache-Control (Cache Control ); the first three
Checkdate: Verify the correctness of the date.
Date: Formats the time of the server.
Strftime: The time of the server is formatted locally.
GETDATE: Get time and date information.
Gettimeofday: Get the current time.
Gmdate: Gets the current time
In the PHP code, obtain the current date time and insert it into the database. By default, PHP explains that the displayed time is "linwei governance standard time", which is 8 hours different from our local time, therefore, the time obtained by
/*
[Discuz!] (C) 2001-2007 Comsenz Inc.
This is NOT a freeware, use is subject to license terms
$ Id: index. php 13764 2008-05-19 03: 14: 01Z heyond $
*/
Define ('curscript', 'index'); // defines the name of the currently running script
Require_once
This article provides a detailed analysis of PHP and browser cache. For more information, see the various optimization solutions on the server.
Client CacheTo be precise, it is the browser cache mechanism.
In fact, each browser has a cache policy,
PHP-time (), date (), mktime () date and time function library. Checkdate verifies the correctness of the date. Syntax: intcheckdate (intmonth, intday, intyear); return value: integer function type: time and date content description if the date is
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.