Adding any of those headers still does not remove the ".php" from the end of the file when I am prompted for the download. I have a client that will be downloading this file, and I do not wish to instruct them to first remove the ".php" extension before they can view it.
Are you using IE? I think it has this annoying feature. From what I've seen on here, the only workaround is to pass an extra variable in the URL that ends in ".csv", even though you don't need to use that variable.
file.php?var=whatever&dummy=f.csv
It doesn't matter what "dummy" is or "f.csv" is, so long as the entire URL ends in ".csv". Hopefully that'll work for you. All of the headers will remain the same.
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php