【发布时间】:2019-12-23 13:36:03
【问题描述】:
我正在使用这样的 URL 呼叫代理:
http://myserver/db.nsf/testagent?openagent¶m1=ONE¶m2=TWO
代理 'testagent' 应该尽快获取参数的值。我读到'query_string' 应该这样做,但是当我真的只想获得值 ONE 和 TWO 时,代码会变得很长。有没有更简单/更快的方法来获取这些值?
我的 Lotus Script 代码如下所示:
Dim s As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim arg As String, p1 As Long
arg = s.DocumentContext.Query_String(0)
p1 = InStr(arg, "&")
If p1 = 0 Then
Print "ERROR: No arugment."
Exit Sub
Else
arg = LCase(Mid$(arg, p1 + 1))
' (more code): Split again the ARG to & (more code)
' (more code): Split the values again to =, after that fill the 2 element as param 1 (ONE) and param 2 (TWO)
End If
【问题讨论】:
标签: lotus-notes lotus-domino lotusscript lotus