php ajax 异步请求生成excel
时间:2011-05-12
来源:互联网
我现在的需求是点击按钮 我选择需要生成的字段,让回回传后台,怎么生成不了excel
直接生成我用一个页面测试了下 可以<?php
require_once '../CommonClass/ClientScriptString.php';
require_once '../CommonClass/Global.php';
$xlsname = date('ymdhis');
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition:filename=$xlsname.xls");
//订单生成excel异步请求
$filed=$_REQUEST["filed"];
echo $filed;
echo utog("你好")."\t";
echo "b"."\t";
echo "b"."\t";
echo "d$xlsname"."\t";
echo "\n";
?>
但是我现在获取的$_REQUEST["filed"];
是异步传输过来的 然后echo生成不了excel
直接生成我用一个页面测试了下 可以<?php
require_once '../CommonClass/ClientScriptString.php';
require_once '../CommonClass/Global.php';
$xlsname = date('ymdhis');
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition:filename=$xlsname.xls");
//订单生成excel异步请求
$filed=$_REQUEST["filed"];
echo $filed;
echo utog("你好")."\t";
echo "b"."\t";
echo "b"."\t";
echo "d$xlsname"."\t";
echo "\n";
?>
但是我现在获取的$_REQUEST["filed"];
是异步传输过来的 然后echo生成不了excel
作者: shenyong985873401 发布时间: 2011-05-12
也是生成了的,只是你是直接输出的,EXCEL生成后没有被客户端正确解析对,因为你是用AJAX请求的,建立修改PHP程序
作者: xkdxiaocainiao 发布时间: 2011-05-19
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28