当前位置: 首页 > 设计代码 > 正文

二级域名的解析指向ASP源码

博客统计

  • 文章总数:221
  • 评论总数:61
  • 友情总数:7
  • 标签总数:76
  • 建站日期:2005-07-23
  • 建站天数:7,681

懂程序的人一看就明白怎么实现了
呵呵!真简单

<%@ LANGUAGE = VBScript.Encode %>
<% Server_Name = Request.ServerVariables("SERVER_NAME") For I=1 To Len(Server_Name) If Mid(Server_Name,i,1)="." Then Exit For USER = USER & Mid(Server_Name,i,1) Next Set conn = Server.CreateObject("ADODB.Connection") DBPath = Server.MapPath("data/url.mdb") conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath SET rs = Server.CreateObject("ADODB.Recordset") sql ="Select * From url where name=“"&user&"“" rs.open sql,conn,1,2 if rs.eof or rs.bof then response.write ("错误:找不到该页") rs.close conn.close set rs=nothing set conn=nothing Else url=rs("zurl") rs.close conn.close set rs=nothing set conn=nothing %>
">
<%End If%>

相关推荐

《二级域名的解析指向ASP源码》等您坐沙发呢!

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

? razz sad evil ! smile oops grin eek shock ??? cool lol mad twisted roll wink idea arrow neutral cry mrgreen