You are probably familiar with using URLs to refer to documents and images on the Web (e.g., http://www.myserver.com/homepage.htm ). URLs also support an extended syntax that allows you to call CGI programs and pass them parameters.
To invoke cfml.exe from a URL, specify the logical path to the executable on your server along with a template parameter indicating which application page file to use in processing the request.
To pass parameters to the script, you append a "?" to it and then specify a list of parameters in a 'key=value' format (delimited by the & character).
For example, to call the script and tell it to use an application page file called myquery.cfm , you would use the syntax:
/cgi-shl/cfml.exe?template=myquery.cfm
You can call the same application page with an additional parameter Employee_ID=346 using the syntax:
/cgi-shl/cfml.exe?template=myquery.cfm&Employee_ID=346
The cgi-shl entry italicized in the preceding examples represents the path to your Web server's CGI directory. Your server's CGI path may be different from this (other common paths are cgi-bin and scripts ). You should consult your Web server's documentation to determine the appropriate path and (if necessary) use this path instead of cgi-shl .
One good way to verify that your server is able to access cfml.exe is to create a simple form without input fields that has an ACTION that calls the cfml.exe script with no arguments (for example, ACTION="/cgi-shl/cfml.exe" ). If the script is accessible, your server returns an error message that indicates an application page was not specified. If cfml.exe is not accessible, your server returns an error message that indicates it cannot find the script.
|