我试图让CFC链接,但我收到一个错误:
这是我的Application.cfc中的Configration
<cfset Application.relativePath = "/">
<cfset Application.componentsPath = Replace(Application.relativePath,"/","",'All')>
<cfset Application.cfcpath = Application.componentsPath & "com">
<cfset Application.tools = '#Application.cfcpath#.tools'>
Run Code Online (Sandbox Code Playgroud)
现在,当我从我的页面访问cfc时,如下所示:
<cfset result = Application.cfcpath.tools.saveDrivers(form)>
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
Element CFCPATH.TOOLS is undefined in a Java object of type class [Ljava.lang.String; referenced as ''
Run Code Online (Sandbox Code Playgroud)
如果我试试
<cfset result = Application.tools.saveDrivers(form)>
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
The saveDrivers method was not found.
Either there are no methods with the specified method name and argument types or the saveDrivers method is overloaded with argument types that ColdFusion cannot decipher reliably. …Run Code Online (Sandbox Code Playgroud) coldfusion ×1