| 1. |
How Can You Invoke Cfc? |
|
Answer» Method 1: <cfinvoke> Method 2: <! Load CFC as an object > <cfscript> // Invoke method user_id=userObj.Get(id); Method 4: URL Invocation : CFCs can also be invoked on the command line directly; EVERY CFC has a URL that POINTS to it. When invoking CFCs via URLs, the method and any arguments are passed as URL parameters, as seen here: http://localhost/users/user.cfc?method=get&id=1 Method 1: <cfinvoke> Method 2: <! Load CFC as an object > <cfscript> // Invoke method user_id=userObj.Get(id); Method 4: URL Invocation : CFCs can also be invoked on the command line directly; every CFC has a URL that points to it. When invoking CFCs via URLs, the method and any arguments are passed as URL parameters, as seen here: http://localhost/users/user.cfc?method=get&id=1 |
|