ASP生成网页链接出错

来源:百度知道 编辑:UC知道 时间:2024/07/06 19:33:21
<a href="&rsxw1("URL")&" class=style3>"&left(rsxw1("bt"),14)&" </a> </td>"
这个语句中URL是数据库表中的一个变量,是个网页的地址
如果想在网页地址中加上根目录,该怎样写?

Ym = Request.ServerVariables("SERVER_NAME")

是本地连接还是http连接?
http连接无需处理
本地的话根目录就是“/”

<a href='data/"&rsxw1("URL")&"' class=style3>"&left(rsxw1("bt"),14)&" </a>
就是本页面同级目录的data目录下的 rsxw1("URL") 页面

<a href='../data/"&rsxw1("URL")&"' class=style3>"&left(rsxw1("bt"),14)&" </a>
就是本页面上级目录的统计data目录下的 rsxw1("URL") 页面

直接打“/”