Is there a way to write the title to the page?-php Tutorial

Source: Internet
Author: User
Is there any way to write the title to the page? below is part of the code. when you open the page, there is content on the page, but the title of the page is a Web site. how to write this title.

Header ("Content-type: application/octet-stream ");
Header ("Accept-Ranges: bytes ");
Header ("Accept-Length:". filesize ($ pagename ));
Header ("Content-Disposition: attachment; filename =". iconv ("UTF-8", "gb2312", $ r [title]). ". txt ");


Reply to discussion (solution)

Are you not downloading an object?

This is file download. I can see that all the pages indexed by Baidu are URLs without titles, so I want to add titles.

The title cannot be added because the title is the file content.

Open a new page to download and upload the title$ TitleYou can.

Open a new page to download and upload the title$ TitleYou can.

The work done by the header generally refers to the http header, not the header of the html document. let's clarify this concept.

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.