Here are some of the time functions in PHP:(1) DateUsage: Date (format, [time]);If there is no time parameter, the current time is used. The format is a string, where the following characters have special meanings:U is replaced by the number of
Original article: www. imooc. comlearn26 determines whether a function exists. When we create a UDF and understand the usage of a variable function, to ensure that the function called by the program exists, function_exists is often used to determine
Header()is used to send raw HTTPHeaders. See the http/1.1 specification for more information on HTTPHeaders.
Example One:
Copy CodeThe code is as follows:
Header ("location:http://www.jb51.net";);
exit;//must add "exit" after each redirect to
Php obtains the local computer file, downloads it, and saves it. To download files in php, we use the readfile () function directly. readfile () can download the server source files, next I will introduce you to the users who download readfile files
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
Print (Date ("L DS of F Y h:i:s A"));
Print ("July 1, is on a". Date ("L", Mktime (0,0,0,7,1,2000)));
?>
Copy CodeExample two:
$tomorrow = Mktime (0,0,0,date ("M"), Date ("D") +1,date ("Y"))
Output Class Reference description (Excerpt CI manual):In general, you may not notice the output class at all, because it is completely transparent to you without your intervention. For example, when you use the loader to load a view file, it is
1. About HTTP MessagesSee: http://www.runoob.com/http/http-messages.htmlThe request header in an HTTP message is the information the browser wants to tell the server, and the response header is the information the server wants to tell the client.
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
In the manual, we write how to set the cache so that the code is not cached: The code is as follows:Copy code Header ("Cache-Control: no-store, no-cache, must-revalidate, post-check = 0, pre-check = 0"); // HTTP/1.1Header ("Expires: Sat, 26 Jul 1
Example 1 The code is as follows:Copy code Header ("Content-Type: text/html; charset = UTF-8 & Prime ;);Header ("Content-type: application/text ");// The file will be called downloaded.pdfHeader ("Content-Disposition: attachment; filename = log.
This article mainly introduces PHP plus nginx implementation of dynamic cropping picture scheme, using Imagick component implementation, need friends can refer to the following Wrote a long time ago is also about high-performance PHP picture
Time is exactly 5 minutes ago, the corresponding timestamp will be formatted 5 minutes ago, the custom format time method is as follows, interested friends can refer to the following Such as: Time is exactly 5 minutes ago, then the corresponding
If you are just beginning to learn PHP, there may be many functions to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is about the Header function detailed use
Of course, the prerequisite is to open a CDN in a function reload_into_ims on. So the user sent over the No-cache is not afraid. Because it will give No-cache to If-modified-since. So we write the program is mainly to if-modified-since control just
No matter how many headers the page has, it executes the last one, but it is conditional, for example:Header (' location:http://www.jb51.net ');Header (' location:http://www.g.cn ');Header (' location:http://www.baidu.com ');This will jump to
Of course, the prerequisite is to open a CDN in a function reload_into_ims on. So the user sent over the No-cache is not afraid. Because it will give No-cache to If-modified-since. So we write the program is mainly to If-modified-since control.
web| Cache | design
For a Web site with a daily visit to millions, the speed is quickly becoming a bottleneck. In addition to optimizing the application of the content publishing system itself, if you can not need real-time update of the dynamic
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.