you should try looking up mime types, to make sure. there's a large list for application mime types here, so take your pick.
The filename tag under "Content-Disposition" is a recommended filename, and is what will show up in the user's save dialogue. The readfile() functionis the actual file path to the file the user is requesting.
.. post your code. I can't help you if I don't know what you're doing.
and just so you know, you don't need to do this to download an exe or zip file.. just make a link to them, the browser will automatically prompt to download..
all EXEs will show up with that icon when downloading, because the icon for that file is embedded in the exe.. and since they haven't downloaded the exe yet, it won't show up, just like CornedBee said.
however, you might be able to assign an icon file on your server to that file, but I have no idea how you'd go about doing it, and it has nothing to do with PHP, but rather how the web server is configured.
then it probably has something to do with the exe, and not the script. it might be corrupt, or you might not have the dependencies installed that it needs to run.
I used the same script and the file I downloaded ran fine.
The code just forwards the browser to the actual location of the server-side file. It won't work if that location is not directly accessible or if you want to generate the file on the fly.
All the buzzt CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
What you pasted just redirects the page to that file, and is only accessible if you have it available on your HTTP server. However, using the method I posted, it's possible for you to download files on the server, but not in the HTTP directories (I believe so, anyway @_@). Basically, the script you made is nothing more than just like creating a link to the exe file :/