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.