所以我知道有很多类似的帖子,但我认为这足以保证自己的问题:
我正在用PHP和jQuery构建一个XLS导出器.我试图用jQuery发布一个数组(我相信它会像GET查询字符串一样长),并使用它在我的服务器上生成一个XLS文件,然后用户可以下载.
我过去曾使用隐藏的iframe来完成此任务,但由于它们只是重定向到一个url,这需要我使用GET,这让我很紧张.
我的问题是:如果这些文件是由多个用户动态生成的,那么如何将这些文件存储在我的服务器上并链接到它们?隐藏的iframe是否会链接到单独的PHP脚本,该脚本根据会话ID或类似内容定位THEIR文件?
在此先感谢任何有关我一直被问到的问题的指导:)
On my company's site we have some tables that we need to export to a csv file.
There are some varying parameters, so the csv file needs to be dynamically created on request.
My problem is that after clicking to download, the response hangs, and waits for the whole file to be created (which can take some time) and only then downloads the entire file in one instant.
I'm using AngularJS, so I'm using window.location = <url_for_file_download> In order to …