Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p>cfftp lets users implement File Transfer Protocol operations. By default, cfftp caches
- an open connection to an FTP server.</p>
- <p>cfftp operations are usually of two types:</p>
- <ul>
- <li>Establishing a connection
- <li>Performing file and directory operations
- </ul>
- <p>This example opens and verifies a connection, lists the files in a directory, and closes
- the connection.</p>
- <p>Open a connection</p>
- <cfftp action = "open"
- username = "anonymous"
- connection = "My_query"
- password = "youremail@email.com"
- server = "ftp.tucows.com"
- stopOnError = "Yes">
- <p>Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput>
- <p>List the files in a directory:
- <cfftp action = "LISTDIR"
- stopOnError = "Yes"
- name = "ListFiles"
- directory = "/"
- connection = "my_query">
- <cfoutput query = "ListFiles">
- #name#<br>
- </cfoutput>
- <p>Close the connection:</p>
- <cfftp action = "close"
- connection = "My_query"
- stopOnError = "Yes">
- <p>Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement