sploit Posted March 8, 2006 Share Posted March 8, 2006 Hiya,I have a simple script which uploads a CSV file to the server.It is saved as filename.csv.I have a direct link to this uploaded file such as <a href="http://www.myserver.com/files/myfile.csv">Download CSV File</a>When I click the link, it gives me an option to download the file.Now I uploaded this same script on another server.On clicking the "Download CSV File" link on this server, it opens the CSV file in the browser instead of giving me the download box.Can I set up the .htaccess file in some way on the second server that would allow the CSV file to be downloaded instead of opened in the browser?Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/4483-making-file-available-for-download-instead-of-opening-in-browser/ Share on other sites More sharing options...
sploit Posted March 9, 2006 Author Share Posted March 9, 2006 for the solution to the above problem: add this to .htaccess:AddHandler application/x-msexcel .csv Quote Link to comment https://forums.phpfreaks.com/topic/4483-making-file-available-for-download-instead-of-opening-in-browser/#findComment-15813 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.