diff options
author | Derek Jones <derek.jones@ellislab.com> | 2010-03-22 17:11:30 +0100 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2010-03-22 17:11:30 +0100 |
commit | 7ec3650749b2c4baf1600bf09fdf3e41f06d87d1 (patch) | |
tree | 72ca75a1607e922e281566a619cdf550c9c5f960 /user_guide | |
parent | 28b293729d2c2917c434c6296eafecd19f397303 (diff) |
added documentation for philsturgeon's submission of download() for the FTP library
Diffstat (limited to 'user_guide')
-rw-r--r-- | user_guide/changelog.html | 3 | ||||
-rw-r--r-- | user_guide/libraries/ftp.html | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 21e1bf142..8d9653aa6 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -89,7 +89,8 @@ Hg Tag: </p> <li>Added HTTP headers and Config information to the <a href="general/profiling.html">Profiler</a> output.</li> <li>Added Chrome and Flock to the list of detectable browsers by <kbd>browser()</kbd> in the <a href="libraries/user_agent.html">User Agent Class</a>.</li> <li>The <a href="libraries/unit_testing.html">Unit Test Class</a> now has an optional "notes" field available to it, and allows for discrete display of test result items using <kbd>$this->unit->set_test_items()</kbd>.</li> - <li>Added a <kbd>$xss_clean</kbd> class variable to the XMLRPC library, enabling control over the use of the Security library's <kbd>xss_clean()</kbd> method.</li> + <li>Added a <kbd>$xss_clean</kbd> class variable to the XMLRPC library, enabling control over the use of the Security library's <kbd>xss_clean()</kbd> method.</li> + <li>Added a <kbd>download()</kbd> method to the <a href="libraries/ftp.html">FTP library</a></li> </ul> </li> <li>Database diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html index 10acdcdab..b5194e8ad 100644 --- a/user_guide/libraries/ftp.html +++ b/user_guide/libraries/ftp.html @@ -188,6 +188,19 @@ Example:</p> <p>Permissions are available if you are running PHP 5 and can be passed as an <kbd>octal</kbd> value in the fourth parameter.</p> +<h2>$this->ftp->download()</h2> + +<p>Downloads a file from your server. You must supply the remote path and the local path, and you can optionally set the mode. +Example:</p> + +<code>$this->ftp->download('/public_html/myfile.html', '/local/path/to/myfile.html', 'ascii');</code> + +<p><strong>Mode options are:</strong> <kbd>ascii</kbd>, <kbd>binary</kbd>, and <kbd>auto</kbd> (the default). If +<kbd>auto</kbd> is used it will base the mode on the file extension of the source file.</p> + +<p>Returns FALSE if the download does not execute successfully (including if PHP does not have permission to write the local file)</p> + + <h2>$this->ftp->rename()</h2> <p>Permits you to rename a file. Supply the source file name/path and the new file name/path.</p> |