Public Function Constant(Tag)
Dim ClassGlobal As Globals
Dim MSSC
Set ClassGlobal = New Globals
Set MSSC = Server.CreateObject("MSScriptControl.ScriptControl")
Constant = MSSC.Eval("ClassGlobal." & Tag)
End FunctionVB里调用eval提示出错:
ScriptControl 错误 '80004005' The operation could not be completed because the script engine has not been initialized to a valid language.
Dim ClassGlobal As Globals
Dim MSSC
Set ClassGlobal = New Globals
Set MSSC = Server.CreateObject("MSScriptControl.ScriptControl")
Constant = MSSC.Eval("ClassGlobal." & Tag)
End FunctionVB里调用eval提示出错:
ScriptControl 错误 '80004005' The operation could not be completed because the script engine has not been initialized to a valid language.
Dim ClassGlobal As Globals
Dim MSSC
Set ClassGlobal = New Globals
Set MSSC = Server.CreateObject("MSScriptControl.ScriptControl")
MSSC.Language = "VBScript" ' 试试这样行不行?
Constant = MSSC.Eval("ClassGlobal." & Tag)
End Function