我有microsoft windows server iis 7,并且在上面安装了apache2。x-sendfile插件安装在apache上,但是当我通过以下代码测试它时:
if (in_array('mod_xsendfile', $modules)) {
// If mod_xsendfile is loaded, use X-Sendfile to deliver.. (optional: I have this as failover to use PHP readfile() if mod_xsendfile is unavailable)
header ('X-Sendfile: ' . $pathToFile);
header ('Content-Type: ' . $documentMIME);
header ('Content-Disposition: attachment; filename="' . $actualFilename . '"');
exit;}什么都没发生!有什么问题吗?
发布于 2017-04-16 15:17:40
在这里,mod_xsendfile的作者已经回答了这个问题:mod_xsendfile for Win x64?
我假设你是在Windows64位和Windows7上。他说没有构建它,尽管该线程中的其他人可以让它工作。我会通读他们的评论/回复。安装并确保修改httpd文件以正确加载它。祝好运。
https://stackoverflow.com/questions/43434706
复制相似问题