Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我需要做一个excel,但我不希望用户自动下载它,但首先它保存在服务器路径中,我如何才能做到这一点?_Php_Excel_Server - Fatal编程技术网

Php 我需要做一个excel,但我不希望用户自动下载它,但首先它保存在服务器路径中,我如何才能做到这一点?

Php 我需要做一个excel,但我不希望用户自动下载它,但首先它保存在服务器路径中,我如何才能做到这一点?,php,excel,server,Php,Excel,Server,我需要做一个excel,但我不希望用户自动下载它,但首先它保存在服务器路径中,我如何才能做到这一点 我有这个代码,但它会自动下载,这是我不希望它做的 header("Content-Type: application/vnd.ms-excel"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("content-disposition: attac

我需要做一个excel,但我不希望用户自动下载它,但首先它保存在服务器路径中,我如何才能做到这一点

我有这个代码,但它会自动下载,这是我不希望它做的

header("Content-Type: application/vnd.ms-excel");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("content-disposition: attachment;filename=Reporte.xls");

我假设某个地方有一些代码创建了“excel”?您不会向响应流显示excel文件的任何写入,而是会将其写入磁盘。如果你想要更有用的答案,你需要提供更多的细节。。。