2013年6月19日

php生成csv文件并提供下载及相关注意事项

摘要: 1、生成文件过程略,只要逗号分割就可以了2、提供下载加上如下代码: header("Content-type: application/octet-stream"); header('Content-Disposition: attachment; filename="' . basename($file) . '"'); header("Content-Length: ". filesize($file)); readfile($file);3、如果数据是utf8的话,excel打开csv文件会乱码, 阅读全文

posted @ 2013-06-19 15:35 argb 阅读(279) 评论(0) 推荐(0) 编辑

导航