我的电脑是WIN2003server,简单的网站已建好可以浏览,但我的ASP为什么不能运行?
zgiw 2004-02-06 02:20:04 以下代码有问题吗?
<% function checkpassword(name,password)
dim conn,param,rs
set conn=server.createobject("adodb.connection")
param="driver={microsoft access driver(*.mdb)};"
conn.open param & "dbq=" & server.mappath("login.mdb")
sql="select * from login where username='" & name & "' and userpassword='" & password & "'"
set rs=conn.execute(sql)
if rs.eof then
checkpassword=false
else
checkpassword=true
end if
end function
%>
<html>
<body>
<%
name=request.form("username")
password=request.form("userpassword")
if not checkpassword(name,password) then
response.write "用户名或密码错误,请重新输入"
else
response.write "正确"
end if
%>
</body>
</html>
在主页上有用户登录表单,在我这个login.asp中只不过是来验证一下我的ASP有没有问题,可总是显示无法显示该网页,就连最简单的ASP程序都不能显示,如:
<% response.write ("fjhfjksdfkjfsdlkflk") %>,我可是按照书上的操作照抄的也提示无法显示该网页,我的ASP程序是放在网站的根目录下,我的网站在2003下可以正常运行,我的ASP程序有问题吗?