使用 Response.BinaryWrite 显示 JPEG [英] Display JPEG using Response.BinaryWrite

查看:31
本文介绍了使用 Response.BinaryWrite 显示 JPEG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在显示这样的图像:

I'm displaying an image like this:

<img src='counter.asp'>

counter.asp 正在做一个命中计数器来确定图像显示的频率(我将用 modrewrite URL 替换它).

counter.asp is doing a hit-counter do determine how often the image was displayed (I'll replace it with a modrewrite URL).

问题:在 counter.asp 脚本中,我需要将实际的 .jpg 图像发送到浏览器.怎么可能做到这一点?我想我需要通过 FSO 加载图像,然后使用 Response.BinaryWrite 发送它 - 有什么想法吗?

The problem: in the counter.asp script I need to send the actual .jpg image to the browser. How could this be done? I suppose I need to load the image through FSO, and then send it using Response.BinaryWrite - any ideas?

推荐答案

FSO 无法加载二进制文件,只能加载文本.您将需要使用第 3 方组件.

FSO cannot load a binary file, only text. You will need to use a 3th party component.

这篇关于使用 Response.BinaryWrite 显示 JPEG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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