php导出csv有关问题

WBOY
Release: 2016-06-13 10:57:05
Original
1063 people have browsed it

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>
Copy after login
Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!