Header has no way to write to page title title

Source: Internet
Author: User
The following is part of the code, now open the page, the page has content, but the title of the page is the URL, 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)

Aren't you downloading the file?

Is the file download, I see Baidu included in the page is full of URLs, no title, so the work wants to add the title.

Can't add title because title is the file content

Open a new page download and upload the title to$titleCan

Open a new page download and upload the title to$titleCan

The work of the header usually refers to the header of the HTTP protocol, not the header of the HTML document, to clarify the 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.