puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<%
    Set json = new ASPJson
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
 
    Set stream = Server.CreateObject("ADODB.Stream")
 
    stream.Open()
    stream.Charset = "UTF-8"
    stream.LoadFromFile Server.MapPath( "config.json" )
 
    content = stream.ReadText()
 
    Set commentPattern = new RegExp
    commentPattern.Multiline = true
    commentPattern.Pattern = "/\*[\s\S]+?\*/"
    commentPattern.Global = true
    content = commentPattern.Replace(content, "")
    json.loadJSON( content )
 
    Set config = json.data
%>