Hi! I've got a little script for downloading files and displaying them in a new tab or browser-window. I simply want the filename to be displayed as the title of the page that's opened. If I add title-tags anywhere it starts to complain which I guess is normal.
It seems so simple, and I figure the header-function have to be able to send the title since it's a header, right? However I've Googled a lot but can't find it, not even a word on the PHP-documents on the header-function about page-title.
What am I missing? Every site I know have the title displayed in the browser window when you watch files. My download-script looks something like this:
header("Content-length: " . $row['size']);
header("Content-type: " . $row['type']);
header("Content-Disposition: inline; filename=\"" . $row['name'] . "\"");
And not much more that's interesting. It looks up the database from a id that's sent in the link you click on like "download.php?id=1". It's just like all the download-script tutorials out there, but they also seem to neglect changing the title of the page. Anyway, thanks!