作者chrismaggie (中仔)
看板PHP
标题[请益] 请问php 网页表格转存excel问题
时间Sat Aug 16 01:31:11 2008
请教各位高手:
因为目前在制作後台系统~需要使用者使用搜寻功能
显示所需资料後~另存excel档案.
假设index.php是资料页面,按下另存後会前往excel.php
然後excel.php就是会跑出另存档案的部份
我知道excel.php在档头必须加入
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=".date("Ymd")."-excel.xls");
这样可以另存档案~但是我不知道怎麽接收资料库栏位?
假设index.php有跑出厂商名称.产品名称与价格三个栏位
分别是$row_sta_year_month['c_name'],$row_sta_year_month['p_name']和
$row_sta_year_month['price']
而我按下令存档案时会跑到excel.php
请问要怎麽将表格中的资料正确带到excel.php呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.132.218.94
1F:推 tsangbor :你index.php怎麽取值excel.php等同方式!只是输出方式 08/16 03:34
2F:→ tsangbor :不同而已! 08/16 03:36