L
lmjgb
Unregistered / Unconfirmed
GUEST, unregistred user!
菜鸟求救!!!!!asp:必须为 MapPath 方法指定路径参数。
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Server.MapPath() 错误 'ASP 0171 : 80004005'
缺少路径
/yyw/createpage.asp,行44
必须为 MapPath 方法指定路径参数。
想把HTM文件放在/yyw/LN目录下。请各位帮帮忙,给出代码,以及加入位置。附原码如下:
<%@LANGUAGE="VBSCRIPT"
CODEPAGE="936"%>
<!--#include file="Connections/conn.asp"
-->
<%
Dim Rs5__MMColParam
Rs5__MMColParam ="2005-12-15"
If (Request.Form("shijian" <> "" then
Rs5__MMColParam = Request.Form("shijian"
End If
%>
<%
Dim Rs5
Dim Rs5_numRows
Set Rs5 = Server.CreateObject("ADODB.Recordset"
Rs5.ActiveConnection = MM_conn_STRING
Rs5.Source = "SELECT * FROM news WHERE shijian =#"
+ Replace(Rs5__MMColParam, "'", "''" + "#"
Rs5.CursorType = 0
Rs5.CursorLocation = 2
Rs5.LockType = 1
Rs5.Open()
Rs5_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Rs5_numRows = Rs5_numRows + Repeat1__numRows
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"
>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>生成静态网页</title>
</head>
<body>
<%
Strfolder = Request.Form("shijian"
set fso=Server.CreateObject("Scripting.FileSystemObject"
set folder = objfso.CreateFolder(Server.mappath(Strfolder))
dim Rs5_total
Rs5_total = 1
%>
<%
While ((Repeat1__numRows <> 0) AND (NOT Rs5.EOF))
%>
<%
Dim StrTitle
StrTitle = Rs5.Fields.Item("biaoti".value
set objectfile=fso.CreateTextFile(Server.mappath(Strfolder&"/"&Strfolder&"-"&Rs5.Fields.Item("newsid".value&".htm",true)
objectfile.write "<html>"&vbcrlf&"<head>"&vbcrlf
objectfile.write "<meta http-equiv='content-type' content='text/html;
charset=gb2312'>"&vbcrlf
objectfile.write "<title>"&StrTitle&"</title>"&vbcrlf
objectfile.write "</head>"&vbcrlf
objectfile.write "<body bgcolor=#FFFFFF>"&vbcrlf
objectfile.write "<center>"&vbcrlf&"<table width=560 border=0 cellspacing=0 cellpadding=0 bgcolor='#FFFFCC'>"&vbcrlf
objectfile.write "<tr><th class=f24><font color=#05006C><h1 style='font-size:14px'>"&StrTitle&"</h1></font></th></tr>"&vbcrlf
objectfile.write "<tr><td height=><hr size=1 bgcolor=#d9d9d9></td></tr>"&vbcrlf
objectfile.write "<tr><td height=20 align=center style='font-size:14px;color:red'>"&Rs5.Fields.Item("shijian".value&"</td></tr>"&vbcrlf
objectfile.write "<tr><td height=15></td></tr>"&vbcrlf
objectfile.write "<tr><td><font style='font-size:12px'>"&Rs5.Fields.Item("neiwen".value&"</font></td></tr>"&vbcrlf
objectfile.write "<tr height=10><td></td></tr>"&vbcrlf
objectfile.write "</table>"&vbcrlf&"</center>"&vbcrlf&"</body>"&vbcrlf&"</html>"
objectfile.close
set objectfile=nothing
Rs5_total= Rs5_total + 1
%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Rs5.MoveNext()
Wend
%>
<% set fso=nothing
Response.Write ("<center>生成了"&Rs5_total&"个网页!<br>"
Response.Write ("单击<a href='newsmanager.asp'>返回</a>到管理主页面</center>"
%>
</body>
</html>
<%
Rs5.Close()
Set Rs5 = Nothing
%>
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Server.MapPath() 错误 'ASP 0171 : 80004005'
缺少路径
/yyw/createpage.asp,行44
必须为 MapPath 方法指定路径参数。
想把HTM文件放在/yyw/LN目录下。请各位帮帮忙,给出代码,以及加入位置。附原码如下:
<%@LANGUAGE="VBSCRIPT"
CODEPAGE="936"%>
<!--#include file="Connections/conn.asp"
-->
<%
Dim Rs5__MMColParam
Rs5__MMColParam ="2005-12-15"
If (Request.Form("shijian" <> "" then
Rs5__MMColParam = Request.Form("shijian"
End If
%>
<%
Dim Rs5
Dim Rs5_numRows
Set Rs5 = Server.CreateObject("ADODB.Recordset"
Rs5.ActiveConnection = MM_conn_STRING
Rs5.Source = "SELECT * FROM news WHERE shijian =#"
+ Replace(Rs5__MMColParam, "'", "''" + "#"
Rs5.CursorType = 0
Rs5.CursorLocation = 2
Rs5.LockType = 1
Rs5.Open()
Rs5_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Rs5_numRows = Rs5_numRows + Repeat1__numRows
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"
>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>生成静态网页</title>
</head>
<body>
<%
Strfolder = Request.Form("shijian"
set fso=Server.CreateObject("Scripting.FileSystemObject"
set folder = objfso.CreateFolder(Server.mappath(Strfolder))
dim Rs5_total
Rs5_total = 1
%>
<%
While ((Repeat1__numRows <> 0) AND (NOT Rs5.EOF))
%>
<%
Dim StrTitle
StrTitle = Rs5.Fields.Item("biaoti".value
set objectfile=fso.CreateTextFile(Server.mappath(Strfolder&"/"&Strfolder&"-"&Rs5.Fields.Item("newsid".value&".htm",true)
objectfile.write "<html>"&vbcrlf&"<head>"&vbcrlf
objectfile.write "<meta http-equiv='content-type' content='text/html;
charset=gb2312'>"&vbcrlf
objectfile.write "<title>"&StrTitle&"</title>"&vbcrlf
objectfile.write "</head>"&vbcrlf
objectfile.write "<body bgcolor=#FFFFFF>"&vbcrlf
objectfile.write "<center>"&vbcrlf&"<table width=560 border=0 cellspacing=0 cellpadding=0 bgcolor='#FFFFCC'>"&vbcrlf
objectfile.write "<tr><th class=f24><font color=#05006C><h1 style='font-size:14px'>"&StrTitle&"</h1></font></th></tr>"&vbcrlf
objectfile.write "<tr><td height=><hr size=1 bgcolor=#d9d9d9></td></tr>"&vbcrlf
objectfile.write "<tr><td height=20 align=center style='font-size:14px;color:red'>"&Rs5.Fields.Item("shijian".value&"</td></tr>"&vbcrlf
objectfile.write "<tr><td height=15></td></tr>"&vbcrlf
objectfile.write "<tr><td><font style='font-size:12px'>"&Rs5.Fields.Item("neiwen".value&"</font></td></tr>"&vbcrlf
objectfile.write "<tr height=10><td></td></tr>"&vbcrlf
objectfile.write "</table>"&vbcrlf&"</center>"&vbcrlf&"</body>"&vbcrlf&"</html>"
objectfile.close
set objectfile=nothing
Rs5_total= Rs5_total + 1
%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Rs5.MoveNext()
Wend
%>
<% set fso=nothing
Response.Write ("<center>生成了"&Rs5_total&"个网页!<br>"
Response.Write ("单击<a href='newsmanager.asp'>返回</a>到管理主页面</center>"
%>
</body>
</html>
<%
Rs5.Close()
Set Rs5 = Nothing
%>