This doesn't seem like a PHP question to me. The download behaviour probably has to do with the mime type sent by the server. It could also be controlled by the browser based on file extension. You can check the server headers using a tool like
firebug.