帮助隐藏图像路径 [英] help hiding image paths

查看:95
本文介绍了帮助隐藏图像路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




任何人都知道隐藏图片路径的有用方法,所以我网站上的图片不能直接链接到

$ b $我见过使用< img src =" image.asp?/moo/fred/image01.jpg">的网站(其中

路径从开始www.domain.com/secretfolder/moo/fred/image01.jpg )但是

不知道怎么设置这个


BTW am在一个共享的主机上所以没有使用基本级别的管理如果

它会有什么不同吗?


有人帮我吗?

mark



anyone know a useful way of hiding image paths so images on my site cant be
directly linked to?
ive seen sites that use <img src="image.asp?/moo/fred/image01.jpg"> (where
the path starts from www.domain.com/secretfolder/moo/fred/image01.jpg) but
dont know how to set this up

BTW am on a shared host so dont have the use of base level administration if
it makes any difference?

anyone help me?
mark


推荐答案

" mark | R" < TR ********* @ hotmail.com>在消息中写道

news:42 *********************** @ news.dial.pipex.com ...



:任何人都知道隐藏图像路径的有用方法,所以我网站上的图片无法支付

be

:直接链接到?

:我见过使用< img src =" image.asp?/moo/fred/image01.jpg">的网站(其中

:路径从 www.domain.com/secretfolder/moo/fred/image01.jpg )但是

:不知道如何设置



:BTW是在共享主机上所以没有使用基本级别的管理

如果

:它有什么区别吗?


您实际上将文件夹放在Web根目录之外,而不是在其下面。


<%@ Language = VBScript%>

<%

选项明确

Response.Buffer = True


函数ReadBinaryFile(FileName)

Const adTypeBinary = 1

Dim BinaryStream

设置BinaryStream = CreateObject(" ADODB.Stream")

BinaryStream.Type = adTypeBinary

BinaryStream.Open

BinaryStream.LoadFromFile FileName

ReadBinaryFile = BinaryStream.Read

结束功能


Con st strPath =" c:\ images \"

dim path,gifdata,file

file =" logo.gif"

path = strPath&文件

gifdata = ReadBinaryFile(路径)

Response.ContentType =" image / gif"

Response.Buffer = True

Response.Clear

Response.BinaryWrite gifdata

Response.Flush

%>


-

Roland Hall

/ *这些信息的分发是希望它有用,但

没有任何保修;甚至没有适销性的暗示保证

或特定用途的适用性。 * /

Technet脚本中心 - http:// www .microsoft.com / technet / scriptcenter /

WSH 5.6文档 - http://msdn.microsoft.com/downloads/list/webdev.asp

MSDN Library - http://msdn.microsoft.com/library/default.asp
"mark | r" <tr*********@hotmail.com> wrote in message
news:42***********************@news.dial.pipex.com ...
:
: anyone know a useful way of hiding image paths so images on my site cant
be
: directly linked to?
: ive seen sites that use <img src="image.asp?/moo/fred/image01.jpg"> (where
: the path starts from www.domain.com/secretfolder/moo/fred/image01.jpg) but
: dont know how to set this up
:
: BTW am on a shared host so dont have the use of base level administration
if
: it makes any difference?

You would actually put the folder outside the web root, not beneath it.

<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True

Function ReadBinaryFile(FileName)
Const adTypeBinary = 1
Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile = BinaryStream.Read
End Function

Const strPath = "c:\images\"
dim path, gifdata, file
file = "logo.gif"
path = strPath & file
gifdata = ReadBinaryFile(path)
Response.ContentType = "image/gif"
Response.Buffer = True
Response.Clear
Response.BinaryWrite gifdata
Response.Flush
%>

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp




" Roland Hall" <没有人@无处>在消息中写道

新闻:OQ ************** @ TK2MSFTNGP14.phx.gbl ...

"Roland Hall" <nobody@nowhere> wrote in message
news:OQ**************@TK2MSFTNGP14.phx.gbl...


标记| R" < TR ********* @ hotmail.com>在消息中写道
新闻:42 *********************** @ news.dial.pipex.com ......
:< br:>:任何人都知道隐藏图像路径的有用方法,所以我网站上的图片不能直接链接到
:我看过使用< img src ="的网站image.asp /moo/fred/image01.jpg"?>
(其中:路径从 www.domain开始) .com / secretfolder / moo / fred / image01.jpg
但是:不知道如何设置

:BTW我在共享主机上所以没有使用基本级
管理如果
:它有什么区别?

你实际上将文件夹放在网络根目录之外,而不是在它之下。
<%@ Language = VBScript%>
<%
选项明确
Response.Buffer = True

函数ReadBinaryFile(FileName)
Const adTypeBinary = 1
Dim BinaryStream
设置BinaryStream = CreateObject(" ADODB.Stream")
BinaryStream.Type = adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile = BinaryStream.Read
结束函数

Const strPath =" c:\ images \"
dim path,gifdata,file
file =" logo.gif&q uot;
path = strPath&文件
gifdata = ReadBinaryFile(路径)
Response.ContentType =" image / gif"
Response.Buffer = True
Response.Clear
Response.BinaryWrite gifdata
Response.Flush
%>

- Roland Hall
/ *这些信息的分发是希望它有用,但<没有任何保证;甚至没有适销性的暗示保证
或适合特定用途的适用性。 * /
Technet脚本中心 - http://www.microsoft.com / technet / scriptcenter /
WSH 5.6文档 -
http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp


"mark | r" <tr*********@hotmail.com> wrote in message
news:42***********************@news.dial.pipex.com ...
:
: anyone know a useful way of hiding image paths so images on my site cant
be
: directly linked to?
: ive seen sites that use <img src="image.asp?/moo/fred/image01.jpg"> (where : the path starts from www.domain.com/secretfolder/moo/fred/image01.jpg) but : dont know how to set this up
:
: BTW am on a shared host so dont have the use of base level administration if
: it makes any difference?

You would actually put the folder outside the web root, not beneath it.

<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True

Function ReadBinaryFile(FileName)
Const adTypeBinary = 1
Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile = BinaryStream.Read
End Function

Const strPath = "c:\images\"
dim path, gifdata, file
file = "logo.gif"
path = strPath & file
gifdata = ReadBinaryFile(path)
Response.ContentType = "image/gif"
Response.Buffer = True
Response.Clear
Response.BinaryWrite gifdata
Response.Flush
%>

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp




是image.asp文件?我想我应该使用response.queystring来获取文件名并将类型设置为jpeg等?


Mark




is that the image.asp file? and i guess i should use response.queystring to
get the filename and set the types to jpeg etc?

Mark



" mark | R"在消息中写道

news:42 *********************** @ news.dial.pipex.com ...

:Roland Hall <没有人@无处>在消息中写道

:新闻:OQ ************** @ TK2MSFTNGP14.phx.gbl ...

:>

:>

:> mark | R" < TR ********* @ hotmail.com>在消息中写道

:>新闻:42 *********************** @ news.dial.pipex.com ...

:> :

:> :任何人都知道隐藏图像路径的有用方法所以我的网站上的图像

cant

:>是

:> :直接链接到?

:> :我见过使用< img src =" image.asp?/moo/fred/image01.jpg">

:(其中

:> :路径从 www.domain.com/secretfolder/moo开始/fred/image01.jpg

:但是

:> :不知道如何设置

:> :

:> :BTW我在共享主机上所以没有使用基础级别

:管理

:>如果

:> :它有什么区别?

:>

:>你实际上将文件夹放在网络根目录之外,而不是在它之下。

:>

:> <%@ Language = VBScript%>

:> <%

:>选项明确

:> Response.Buffer = True

:>

:>函数ReadBinaryFile(FileName)

:> Const adTypeBinary = 1

:> Dim BinaryStream

:>设置BinaryStream = CreateObject(" ADODB.Stream")

:> BinaryStream.Type = adTypeBinary

:> BinaryStream.Open

:> BinaryStream.LoadFromFile FileName

:> ReadBinaryFile = BinaryStream.Read

:>结束功能

:>

:> Const strPath =" c:\ images \"

:>昏暗的路径,gifdata,文件

:> file =" logo.gif"

:> path = strPath&文件

:> gifdata = ReadBinaryFile(路径)

:> Response.ContentType =" image / gif"

:> Response.Buffer = True

:> Response.Clear

:> Response.BinaryWrite gifdata

:> Response.Flush

:> %>

:>



:是image.asp文件吗?我想我应该使用response.queystring



:获取文件名并将类型设置为jpeg等?


如果它是一个链接,你在URL上传递名称,是的,请使用

Request.QueryString。对于要读取的文件,ContentType需要是相应的MIME

类型。


-

Roland Hall

/ *这些信息的分发是希望它有用,但

没有任何保证;甚至没有适销性的暗示保证

或特定用途的适用性。 * /

Technet脚本中心 - http:// www .microsoft.com / technet / scriptcenter /

WSH 5.6文档 - http://msdn.microsoft.com/downloads/list/webdev.asp

MSDN Library - http://msdn.microsoft.com/library/default.asp
"mark | r" wrote in message
news:42***********************@news.dial.pipex.com ...
: "Roland Hall" <nobody@nowhere> wrote in message
: news:OQ**************@TK2MSFTNGP14.phx.gbl...
: >
: >
: > "mark | r" <tr*********@hotmail.com> wrote in message
: > news:42***********************@news.dial.pipex.com ...
: > :
: > : anyone know a useful way of hiding image paths so images on my site
cant
: > be
: > : directly linked to?
: > : ive seen sites that use <img src="image.asp?/moo/fred/image01.jpg">
: (where
: > : the path starts from www.domain.com/secretfolder/moo/fred/image01.jpg)
: but
: > : dont know how to set this up
: > :
: > : BTW am on a shared host so dont have the use of base level
: administration
: > if
: > : it makes any difference?
: >
: > You would actually put the folder outside the web root, not beneath it.
: >
: > <%@ Language=VBScript %>
: > <%
: > Option Explicit
: > Response.Buffer = True
: >
: > Function ReadBinaryFile(FileName)
: > Const adTypeBinary = 1
: > Dim BinaryStream
: > Set BinaryStream = CreateObject("ADODB.Stream")
: > BinaryStream.Type = adTypeBinary
: > BinaryStream.Open
: > BinaryStream.LoadFromFile FileName
: > ReadBinaryFile = BinaryStream.Read
: > End Function
: >
: > Const strPath = "c:\images\"
: > dim path, gifdata, file
: > file = "logo.gif"
: > path = strPath & file
: > gifdata = ReadBinaryFile(path)
: > Response.ContentType = "image/gif"
: > Response.Buffer = True
: > Response.Clear
: > Response.BinaryWrite gifdata
: > Response.Flush
: > %>
: >
:
: is that the image.asp file? and i guess i should use response.queystring
to
: get the filename and set the types to jpeg etc?

If it''s a link and you''re passing the name on the URL, yes, use
Request.QueryString. The ContentType would need to be the appropriate MIME
type for the file being read.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


这篇关于帮助隐藏图像路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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