diff options
author | admin <devnull@localhost> | 2006-10-27 09:41:28 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-27 09:41:28 +0200 |
commit | 631f17b88124619dd27a04509970da155a3fc1b7 (patch) | |
tree | c84802140bb4efd2280f71efdc768cc568920db2 | |
parent | 865b4b32ff813156c577e336114ae67b4be1a259 (diff) |
-rw-r--r-- | system/libraries/Ftp.php | 32 | ||||
-rw-r--r-- | user_guide/libraries/email.html | 2 | ||||
-rw-r--r-- | user_guide/libraries/ftp.html | 2 |
3 files changed, 28 insertions, 8 deletions
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index 6c1bad8e1..a0c6895bf 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -31,7 +31,6 @@ class CI_FTP { var $password = ''; var $port = 21; var $passive = TRUE; - var $secure = FALSE; var $debug = FALSE; var $conn_id; @@ -80,11 +79,18 @@ class CI_FTP { * FTP Connect * * @access public + * @param array the connection values + * @param bool whether to use a secure or standard connection * @return bool */ - function connect() - { - $method = ($this->secure == FALSE) ? 'ftp_connect' : 'ftp_ssl_connect'; + function connect($config = array(), $secure = FALSE) + { + if (count($config) > 0) + { + $this->initialize($config); + } + + $method = ($secure == FALSE) ? 'ftp_connect' : 'ftp_ssl_connect'; if (FALSE === ($this->conn_id = @$method($this->hostname, $this->port))) { @@ -112,6 +118,20 @@ class CI_FTP { return TRUE; } + + // -------------------------------------------------------------------- + + /** + * Secure FTP Connect + * + * @access public + * @param array the connection values + * @return bool + */ + function sconnect($config = array()) + { + return $this->connect($config, TRUE); + } // -------------------------------------------------------------------- @@ -297,8 +317,8 @@ class CI_FTP { * Read a directory and recreate it remotely * * This function recursively reads a folder and everything it contains (including - * sub-folders) and creates a mirror via FTP based on it. Whatever directory structure - * is in the original file path will be recreated in the zip file. + * sub-folders) and creates a mirror via FTP based on it. Whatever the directory structure + * of the original file path will be recreated on the server. * * @access public * @param string path to source with trailing slash diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html index b8a68e9d1..96150eca8 100644 --- a/user_guide/libraries/email.html +++ b/user_guide/libraries/email.html @@ -119,7 +119,7 @@ $this->email->initialize($config);</code> <p><strong>Note:</strong> Most of the preferences have default values that will be used if you do not set them.</p
-<h3>Setting Email Preferences in your Config File</h3>
+<h3>Setting Email Preferences in a Config File</h3>
<p>If you prefer not to set preferences using the above method, you can instead put them into a config file.
Simply create a new file called the <var>email.php</var>, add the <var>$config</var>
diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html index ae025f5f1..4df9c545b 100644 --- a/user_guide/libraries/ftp.html +++ b/user_guide/libraries/ftp.html @@ -183,7 +183,7 @@ array in that file. Then save the file at <var>config/ftp.php</var> and it will <h2>$this->ftp->upload()</h2>
-<p>Uploads a file to your server. You must supply the local path and the remote path (with trailing slash), and you can optionally set the mode and permissions.
+<p>Uploads a file to your server. You must supply the local path and the remote path, and you can optionally set the mode and permissions.
Example:</p>
|