Lan*_*fee 1 php apache image
在渲染图像文件时,我有哪些选择?假设我在foo/bar.png中保存了一个
目前我知道我可以使用readfile()或更好,X-Sendfile(我在Apache上).有什么其他方法比使用更好readfile()?
readfile()
X-Sendfile
我想将图像输出到浏览器(Content-Type:image/png)
Fra*_*til 5
将最好的解决办法是让你的网络服务器(Apache)的服务内容本身.如果必须使用PHP,那么您需要确保首先将Content-Type设置为适当的值:
header("Content-type: image/png");
然后readfile()用来发送图像本身.
归档时间:
13 年,2 月 前
查看次数:
1362 次
最近记录: