利用X-SENDFILE与Apache / PHP [英] Using X-Sendfile with Apache/PHP

查看:179
本文介绍了利用X-SENDFILE与Apache / PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法找到在X SENDFILE或例如code PHP的多文档(有一部分轨code)。

I can't seem to find much documentation on X-Sendfile or example code for PHP (there is some rails code).

任何人都使用过它,不介意让code的快速片段和简要说明?

Anyone used it before and would mind giving a quick snippet of code and a brief description?

推荐答案

X-SENDFILE是一个HTTP头,让你想是这样的:

X-Sendfile is an HTTP header, so you want something like this:

header("X-Sendfile: $filename");

您的Web服务器把它捡起,如果配置正确。下面是一些细节:

Your web server picks it up if correctly configured. Here's some more details:

<一个href=\"http://www.jasny.net/articles/how-i-php-x-sendfile/\">http://www.jasny.net/articles/how-i-php-x-sendfile/

这篇关于利用X-SENDFILE与Apache / PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆