求助!!!asp代码里的问题!请大虾帮忙 222分

来源:百度知道 编辑:UC知道 时间:2024/06/11 23:23:42
请会的朋友帮我把下面代码的意思说说!谢谢了!一直弄不懂他们的意思!

Quote:
dim id

id=request("id")

id="index_"&id&".html"

---------------------------------------------------------------------

Quote:
<%
dim id

id=request("id")
if instr(id,"index") then
id=replace(id,"index","/index")
id=id&".html"
end if
----------------------------------------------------------------------

Quote:
<%
dim id
id=request("id")
if instr(id,"/") then
id=id
else

id=replace(id,"--","/")&".html"
end if
========================================

Quote:
<%
dim id
id=request("id")
id=CStr(id)
if instr(id,"@") then

id=replace(id,"--","/")&".htm"<

Quote:
dim id

id=request("id")

id="index_"&id&".html"

定义变量id
解手地址栏?后面数据 然后赋予id
连接index_ .html 字符串 得到的值赋予id
功能估计是:地址栏传过来页面的编号然后组合获得这个页面的名字
---------------------------------------------------------------------

Quote:
<%
dim id

id=request("id")
if instr(id,"index") then
id=replace(id,"index","/index")
id=id&".html"
end if
定义id
获取参数赋予id变量
如果 id变量里含有index 字符 则 instr(a,b)函数意思是返回 b字符串在a中的位置
把index字符替换成/index
组合字符串获得文件路径
功能:获取文件相对路径
----------------------------------------------------------------------

Quote:
<%
dim id
id=request("id")
if instr(id,"/") then
id=id
else

id=replace(id,"--","/")&".html"
end if

一样的就不写了
如果参数