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.