[英]Loading a image format from MySQL Blob - PHP?
My question is simply asking how take a MySQL blob that is a image format (ie png, gif, jpg) and save it as a temporary file for the client to load. 我的问题只是问如何获取图像格式(即png,gif,jpg)的MySQL blob并将其保存为临时文件以供客户端加载。
Thanks! 谢谢!
file_put_contents
? file_put_contents
?
Alternatively, to avoid the need for a temporary file, you could use the data:
scheme, however you would need to know the exact type of the image in question and there are limitations in the browsers. 另外,为避免需要临时文件,可以使用
data:
方案,但是您需要知道所涉及图像的确切类型,并且浏览器中存在限制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.