|
Hosted and maintained by Ben Forta. Designed by Trilemetry. |
| Language: | © 2002-2007 Ben Forta. All Rights Reserved | ||
| <Home> <FAQ> <Question> | <About> | ||
Question |
| Is there a way for a file to know it's own file name? | ||
| There are a few ways:
cgi.script_name refers to both the path and file name, so if your file was in a folder under the webroot called stuff, and was named foo.cfm, the value of cgi.script_name would be /stuff/foo.cfm.
Another cgi variables, cgi.cf_template_path, represents the complete path of the current file. You can also call the CF function, getCurrentTemplatePath. If you only want the file name from these two values, use the getFileFromPath function. |
||
Comments |
Add Your Comments |
| <submit question> | ||