PHP download, support a variety of files and breakpoints continue to passfunction Download ($url, $filename) {Get file size, prevent more than 2G of files, read with sprintf$filesize = sprintf ("%u", FileSize ($url));if (! $filesize) {Return}Header (
The world is divided into 24 time zones, GMT is a zero time zone, that is, the Greenwich Mean Time. China is located in GMT, eight hours more than GMT. For example, GMT is 09:45:32, and our time is 01:45:32.
The mktime () function of PHP returns
I. Preface
Ii. Compilation and Installation
Iii. Install MySQL and memcache
4. install Apache, PHP, eaccelerator, and PHP-memcache
5. Install squid
Vi. Postscript
I. Preface
I. Preface and preparationsCurrently, the lamp development mode
Of course, you must first enable the reload_assist_ims on Function in CDN. in this way, no-cache is not used. this will convert no-cache to If-Modified-Since. therefore, we can write a program to control If-Modified-Since. note: In the cache system
Use the PHPheader () function in detail (error settings such as 301 and 404 ). If you have just started learning PHP, there may be many functions that need to be studied. today we will learn how to use PHPHeader (). for more instructions, please
Explore the usage of headers in php. Header () isusedtosendrawHTTPheaders. SeetheHTTP1.1specificationformoreinformationonHTTPheaders. Example 1: Copy the code as follows :? PHPHeader (Location: http:
Header()Is used to send raw HTTPHeaders. See the
PHPheader () function description (301, 404, and other error settings ). If you have just started learning PHP, there may be many functions that need to be studied. today we will learn how to use PHPHeader (). for more instructions, please refer to
Use the PHPheader () function to implement the 404 error prompt function on the page. we have compiled the detailed usage of the PHPheader () function and shared it with you. we need to provide more support for our 404 page.
If you have just started
Php Development Guide: cache details. We can use the header in the HTML page to control it by using the metatag and PHP programs. for example, the code is as follows header (Cache-Control: max-age86400, must-revalidate ); 24-hour header (Last-Mo, we
If you have just started to learn PHP, there may be many functions need to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is a detailed use of the header function
Some browsers cache the verification code, causing the verification code to expire when you re-open the page. Refresh the browser.
How can this problem be solved? what code can force the verification code to be reloaded.
Reply to discussion
The header () function sends the original HTTP header to the client.
Copy CodeThe code is as follows:
200 normal state
Header (' http/1.1 OK ');
301 permanent Redirect, remember to add a redirect address at the back location: $url
Header (' http/1.
PHP downloads the function instance code of the file ,. Function instance code of the PHP file to be downloaded. the Function Code functiondownload ($ url, $ filename) {obtains the file size to prevent files larger than 2 GB, use spr PHP to download
In our actual development, we may need to set the expiration time for the webpage to expire within a period of time. For example, if we use Chinacache CDN, how should we design it so that it can cache my content. in our actual development, we may
Copy CodeThe code is as follows:
Fix 404 Pages:
Header (' http/1.1 OK ');
Set 404 Header:
Header (' http/1.1 404 Not Found ');
Set Moved permanently header (Good for redrictions)
Use with location header
Header (' http/1.1 301 Moved permanently ');
If you have just started to learn PHP, there may be many functions need to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is a detailed use of the header function
Using Squid as a proxy server, static pages are relatively simple, but dynamic pages are not that simple. In particular, most web pages are dynamic pages. O & M personnel should pay attention to this configuration when setting up Squid. The
Of course, you must first enable the reload_assist_ims on Function in CDN. in this way, no-cache is not used. this will convert no-cache to if-modified-since. so we write
ProgramIt is better to control if-modified-since. note: In the cache system
Browser cache is totally different. The cached content is stored locally in the browser, but the content is generated by the web server. Neither party can complete this system process independently, therefore, there must be a communication mechanism
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.