PHP header () function common methods _php Tutorial

Source: Internet
Author: User

< span="">

Defining the Encoding

Atom

Css

Javascript

JPEG Image

Json

Pdf

Rss

Text (Plain)

Xml

Ok

Set a 404 Header:

Set address to be permanently redirected

Go to a new address

File Delay Steering:
print ' You'll be redirected in ten seconds ';
Of course, you can also use HTML syntax to implement
//
Header (' content-transfer-encoding:binary ');
Load the file to send:
ReadFile (' Example.zip ');
Disable caching for the current document
Header (' Expires:mon, Jul 1997 05:00:00 GMT '); Date in the past
Header (' Pragma:no-cache ');
To set the content type:
Header (' content-type:text/html; Charset=utf-8 ');
Header (' Content-type:text/plain '); Plain Text Format
Header (' Content-type:image/jpeg '); jpg***
Header (' Content-type:application/zip '); ZIP file
Header (' content-type:application/pdf '); PDF file
Header (' Content-type:audio/mpeg '); Audio files
Header (' Content-type:application/x-shockw**e-flash '); Flash Animation
Show Login dialog box
header (' Www-authenticate:basic realm= ' Top Secret ');
print ' Text that would be displayed if the user hits cancel or ';
print ' enters wrong login data ';

http://www.bkjia.com/phpjc/753935.html www.bkjia.com true http://www.bkjia.com/phpjc/753935.html techarticle //definition encoding//atom//css//javascript//jpeg Image//json//pdf//rss//text ( Plain)//xml//OK//Set a 404 Header://Set Address to be permanently redirected//go to a new address ...

  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.