Home >Backend Development >PHP Tutorial >Things to note when php generates csv files

Things to note when php generates csv files

WBOY
WBOYOriginal
2016-07-25 08:55:12951browse
  1. header("Content-type: application/octet-stream");
  2. header("Content-Disposition: attachment; filename=vote".time().".csv; charset=utf-8") ;
Copy code

If it is utf-8, you must output the BOM information first, remember:

  1. echo "/xEF/xBB/xBF".$output;
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn