ASP网页上传后无法显示
本人用DW做的ASP页,在本地测试一切正常,上传到服务器以后就无法显示。在IE中查看友好错误信息内容如下图所示。已知服务器支持ASP以及ACCESS。请教错误代码如何修改...
本人用DW做的ASP页,在本地测试一切正常,上传到服务器以后就无法显示。在IE中查看友好错误信息内容如下图所示。已知服务器支持ASP 以及ACCESS。请教错误代码如何修改。
原码如下:
<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/id.asp" -->
<%
var Recordset2_cmd = Server.CreateObject ("ADODB.Command");
Recordset2_cmd.ActiveConnection = MM_id_STRING;
Recordset2_cmd.CommandText = "SELECT * FROM 1";
Recordset2_cmd.Prepared = true;
var Recordset2 = Recordset2_cmd.Execute();
var Recordset2_numRows = 0;
%>
<%
// *** Validate request to log in to this site.
var MM_LoginAction = Request.ServerVariables("URL");
if (Request.QueryString != "") MM_LoginAction += "?" + Server.HTMLEncode(Request.QueryString);
var MM_valUsername = String(Request.Form("textfield"));
if (MM_valUsername != "undefined") {
var MM_fldUserAuthorization = "";
var MM_redirectLoginSuccess = "logins.asp";
var MM_redirectLoginFailed = "loginf.html";
var MM_loginSQL = "SELECT username, password";
if (MM_fldUserAuthorization != "") MM_loginSQL += "," + MM_fldUserAuthorization;
MM_loginSQL += " FROM [1] WHERE username = ? AND password = ?";
var MM_rsUser_cmd = Server.CreateObject ("ADODB.Command");
MM_rsUser_cmd.ActiveConnection = MM_id_STRING;
MM_rsUser_cmd.CommandText = MM_loginSQL;
MM_rsUser_cmd.Parameters.Append(MM_rsUser_cmd.CreateParameter("param1", 200, 1, 50, MM_valUsername)); // adVarChar
MM_rsUser_cmd.Parameters.Append(MM_rsUser_cmd.CreateParameter("param2", 200, 1, 50, Request.Form("textfield2"))); // adVarChar
MM_rsUser_cmd.Prepared = true;
var MM_rsUser = MM_rsUser_cmd.Execute();
if (!MM_rsUser.EOF || !MM_rsUser.BOF) {
// username and password match - this is a valid user
Session("MM_Username") = MM_valUsername;
if (MM_fldUserAuthorization != "") {
Session("MM_UserAuthorization") = String(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value);
} else {
Session("MM_UserAuthorization") = "";
}
if (String(Request.QueryString("accessdenied")) != "undefined" && false) {
MM_redirectLoginSuccess = Request.QueryString("accessdenied");
}
MM_rsUser.Close();
Response.Redirect(MM_redirectLoginSuccess);
}
MM_rsUser.Close();
Response.Redirect(MM_redirectLoginFailed);
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>login</title>
<style type="text/css">
<!--
body {
background-image: url();
color: #89D8F6;
font-size: 24px;
font-weight: bold;
}
#form1 table tr td {
color: #FFC342;
font-size: 14px;
}
.c1 {
font-size: 24px;
}
-->
</style>
=====未完,其余代码在补充中添加=====
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
=======篇幅有限,请愿意帮助的达人留下联系方式,我发完整的代码出来 ========== 展开
原码如下:
<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/id.asp" -->
<%
var Recordset2_cmd = Server.CreateObject ("ADODB.Command");
Recordset2_cmd.ActiveConnection = MM_id_STRING;
Recordset2_cmd.CommandText = "SELECT * FROM 1";
Recordset2_cmd.Prepared = true;
var Recordset2 = Recordset2_cmd.Execute();
var Recordset2_numRows = 0;
%>
<%
// *** Validate request to log in to this site.
var MM_LoginAction = Request.ServerVariables("URL");
if (Request.QueryString != "") MM_LoginAction += "?" + Server.HTMLEncode(Request.QueryString);
var MM_valUsername = String(Request.Form("textfield"));
if (MM_valUsername != "undefined") {
var MM_fldUserAuthorization = "";
var MM_redirectLoginSuccess = "logins.asp";
var MM_redirectLoginFailed = "loginf.html";
var MM_loginSQL = "SELECT username, password";
if (MM_fldUserAuthorization != "") MM_loginSQL += "," + MM_fldUserAuthorization;
MM_loginSQL += " FROM [1] WHERE username = ? AND password = ?";
var MM_rsUser_cmd = Server.CreateObject ("ADODB.Command");
MM_rsUser_cmd.ActiveConnection = MM_id_STRING;
MM_rsUser_cmd.CommandText = MM_loginSQL;
MM_rsUser_cmd.Parameters.Append(MM_rsUser_cmd.CreateParameter("param1", 200, 1, 50, MM_valUsername)); // adVarChar
MM_rsUser_cmd.Parameters.Append(MM_rsUser_cmd.CreateParameter("param2", 200, 1, 50, Request.Form("textfield2"))); // adVarChar
MM_rsUser_cmd.Prepared = true;
var MM_rsUser = MM_rsUser_cmd.Execute();
if (!MM_rsUser.EOF || !MM_rsUser.BOF) {
// username and password match - this is a valid user
Session("MM_Username") = MM_valUsername;
if (MM_fldUserAuthorization != "") {
Session("MM_UserAuthorization") = String(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value);
} else {
Session("MM_UserAuthorization") = "";
}
if (String(Request.QueryString("accessdenied")) != "undefined" && false) {
MM_redirectLoginSuccess = Request.QueryString("accessdenied");
}
MM_rsUser.Close();
Response.Redirect(MM_redirectLoginSuccess);
}
MM_rsUser.Close();
Response.Redirect(MM_redirectLoginFailed);
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>login</title>
<style type="text/css">
<!--
body {
background-image: url();
color: #89D8F6;
font-size: 24px;
font-weight: bold;
}
#form1 table tr td {
color: #FFC342;
font-size: 14px;
}
.c1 {
font-size: 24px;
}
-->
</style>
=====未完,其余代码在补充中添加=====
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
=======篇幅有限,请愿意帮助的达人留下联系方式,我发完整的代码出来 ========== 展开
展开全部
楼主这个是典型的JS错误。你发这个上来也看不到是什么错误。
看楼主的代码,是初学者,都喜欢用DW自动生成。
我可以很负责的告诉你,你这代码有太多的无用万分在里面。
建议你还是把它换掉。想成高手,必须自己手写代码。。
看楼主的代码,是初学者,都喜欢用DW自动生成。
我可以很负责的告诉你,你这代码有太多的无用万分在里面。
建议你还是把它换掉。想成高手,必须自己手写代码。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
没有完整的代码,别人也帮不了你,
发给我帮你看一下吧,
450316625
发给我帮你看一下吧,
450316625
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可能是兼容性的问题。好好看看
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询