账号通
    

账号  

密码  

5770

查看

4

回复
主题:Microsoft VBScript 编译器错误 错误 800a03ea 问题 求大侠! [收藏主题] 转到:  
无名指的等待 当前离线

1

主题

1

广播

0

粉丝
添加关注
级别:学前班

用户积分:3 分
登录次数:4 次
注册时间:2012/7/30
最后登录:2012/7/31
无名指的等待 发表于:2012/7/31 9:22:33   | 显示全部帖子 查看该作者主题 楼主 
科汛在线网校系统
Microsoft VBScript 编译器错误 错误 '800a03ea' 语法错误

D:\WWWROOT\WWW.TTJYKS.COM\CLUB\../KS_Cls/Kesion.IfCls.asp,行 15

以下是程序:

<%
  Public Function RexHtml_IF(ByVal str)
        Dim Reg
        Set Reg = New RegExp
        Reg.IgnoreCase = True
        Reg.Global = True
       ' On Error Resume Next
        Dim Matches, Match
        Dim TestIF,KS
  Set KS=New PublicCls
        
        Reg.Pattern = "{ElseIf([\s\S]*?):(.+?)}([\s\S]*?){Else\1}([\s\S]*?){/ElseIf\1}"
        Set Matches = Reg.Execute(str)
        For Each Match In Matches
            Execute ("If " & Match.SubMatches(1) & " Then TestIf = True Else TestIf = False")
            If TestIF Then str = Replace(str, Match.Value, Match.SubMatches(2)) Else str = Replace(str, Match.Value, Match.SubMatches(3)) ' 替换
            If Err Then Response.Write "<font color=red>执行Else" & Match.SubMatches(0) & "标签失败 [" & Match.SubMatches(1) & "]" & Err.Description & "</font>": Err.Clear: Response.End
        Next
        
        Reg.Pattern = "{If([\s\S]*?):(.+?)}([\s\S]*?){/If\1}"
        Set Matches = Reg.Execute(str)
        For Each Match In Matches
            Execute ("If " & Match.SubMatches(1) & " Then TestIf = True Else TestIf = False")
            If TestIF Then str = Replace(str, Match.Value, Match.SubMatches(2)) Else str = Replace(str, Match.Value, "") ' 替换
            If Err Then Response.Write "<font color=red>执行IF" & Match.SubMatches(0) & "标签失败 [" & Match.SubMatches(1) & "]" & Err.Description & "</font>": Err.Clear: Response.End
        Next
        
     Set Matches = Nothing
     Set Reg = Nothing
   
  If RegExists("{ElseIf([\s\S]*?):(.+?)}([\s\S]*?){Else\1}([\s\S]*?){/ElseIf\1}", str) Or RegExists("{If([\s\S]*?):(.+?)}([\s\S]*?){/If\1}", str) Then str = RexHtml_IF(str) '再次替换
   
     RexHtml_IF = str
    End Function

Public Function RegExists(ByVal Pattern, ByVal TestContent)
  Dim Reg
  Set Reg = New RegExp
        Reg.IgnoreCase = True
        Reg.Global = True
  Reg.Pattern = Pattern
  RegExists = Reg.Test(TestContent)
End Function

%> 求大侠解决下

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.06348秒 powered by KesionCMS 9.0