Things to note when php generates csv files

WBOY
Release: 2016-07-25 08:55:12
Original
915 people have browsed it
  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


source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template