Home >Backend Development >PHP Tutorial > php导出csv有关问题

php导出csv有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 13:07:27886browse

php导出csv问题
数据导出成表格后,居然连同html代码全部导出了,怎么回事?求教啊各位大大

------解决方案--------------------
这个导出csv数据没啥难度的吧?

PHP code

header('Content-type: text/csv; charset=UTF-8');
header('Cache-control: private');
header("Content-Disposition: attachment; filename=report".date("His").".csv");
//echo(chr(239).chr(187).chr(191));
readfile("output_report.csv");
die(); <div class="clear">
                 
              
              
        
            </div>
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