title: CSV file - browser opens it instead of downloading
body: <p>I wrote PHP code to export data to <code>.csv</code> file. The exported <code>.csv</code> file was downloadable on my own PC. But in client's server, the <code>.csv</code> file was not downloadable, it was in readable format (the browser can read and print the file contents like a <code>.html</code> file).</p>
  
  <p>I used <code>header()</code> before accessing the <code>.csv</code> file.</p>
  
  <p>Is it a server side problem or do I need to change my code?</p>