简体   繁体   中英

Coldfusion CFINVOKE parameter not working?

I want to invoke a cfc file on my webserver, but I always get the error: The required parameter [UserID] was not provided.

Coldfusion code:

<CFINVOKE component="changeTree" method="getTreeWidth" returnVariable="httpTreeWidth">
<cfinvokeargument name="UserID" value="#checklogin.UserID#">
</CFINVOKE>

changeTree.cfc:

<CFFUNCTION name="getTreeWidth">
<CFPARAM name="UserID" required="true">
...

Thanks for help.

在changeTree.cfc中,它应该是<cfargument name="UserID" required="true">而不是<cfparam>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM