Posted By

sekihin on 12/23/10


Tagged

php csv


Versions (?)

Download local csv


 / Published in: PHP
 

URL: http://opqr.jp/2007/09/php.html

  1. <?php
  2. $file = "sample.csv";
  3. $file_length = filesize($file);
  4. header("Content-Disposition: attachment; filename=$file");
  5. header("Content-Length:$file_length");
  6. header("Content-Type: application/octet-stream");
  7. readfile ($file);
  8. ?>

Report this snippet  

You need to login to post a comment.