求一个简单ASP文件

来源:百度知道 编辑:UC知道 时间:2024/06/02 05:07:35
本人现在ASP用不了,急需一个简单的ASP文件。

要是这不行找我,,什么样的都有

<%
on error resume next

db = "database/newBook.mdb "'数据库名
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open strConn
If Err Then
Err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错,请打开conn.asp文件检查连接字串。"
Response.End
End If
%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
你的IP地址为:
<% Ip_address=Request.ServerVariables ("REMOTE_ADDR") '获得客户端的ip地址
Response.Write Ip_address '显示客户端的ip地址,调试程序时用用而已,真正用的时候不应该让用户看到
%>