0
>         header("Content-type: application/octet-stream");
>         header("Content-Disposition: attachment; filename=file.txt");
>         header("Pragma: no-cache");
>         header("Expires: 0");
>         print "$data";

The file downloaded has $data in it, however always adds a "null" at the end. What am i doing wrong?

James Gu
  • 1,382
  • 4
  • 26
  • 39

0 Answers0