From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- user_guide/libraries/ftp.html | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'user_guide/libraries/ftp.html') diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html index 43b949a50..c318bc15a 100644 --- a/user_guide/libraries/ftp.html +++ b/user_guide/libraries/ftp.html @@ -59,7 +59,7 @@ FTP Class

FTP Class

CodeIgniter's FTP Class permits files to be transfered to a remote server. Remote files can also be moved, renamed, -and deleted. The FTP class also includes a "mirroring" function that permits an entire local directory to be recreated remotely via FTP.

+and deleted. The FTP class also includes a "mirroring" function that permits an entire local directory to be recreated remotely via FTP.

Note:  SFTP and SSL FTP protocols are not supported, only standard FTP.

@@ -74,7 +74,7 @@ and deleted. The FTP class also includes a "mirroring" function that permits an

Usage Examples

In this example a connection is opened to the FTP server, and a local file is read and uploaded in ASCII mode. The -file permissions are set to 755. Note: Setting permissions requires PHP 5.

+file permissions are set to 755. Note: Setting permissions requires PHP 5.

$this->load->library('ftp');
@@ -157,26 +157,26 @@ $this->ftp->connect($config);

Setting FTP Preferences in a Config File

If you prefer you can store your FTP preferences in a config file. -Simply create a new file called the ftp.php, add the $config +Simply create a new file called the ftp.php, add the $config array in that file. Then save the file at config/ftp.php and it will be used automatically.

Available connection options:

$this->ftp->upload()

-

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. +

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:

@@ -190,7 +190,7 @@ Example:

$this->ftp->download()

-

Downloads a file from your server. You must supply the remote path and the local path, and you can optionally set the mode. +

Downloads a file from your server. You must supply the remote path and the local path, and you can optionally set the mode. Example:

$this->ftp->download('/public_html/myfile.html', '/local/path/to/myfile.html', 'ascii'); @@ -202,7 +202,7 @@ Example:

$this->ftp->rename()

-

Permits you to rename a file. Supply the source file name/path and the new file name/path.

+

Permits you to rename a file. Supply the source file name/path and the new file name/path.

// Renames green.html to blue.html
@@ -210,7 +210,7 @@ $this->ftp->rename('/public_html/foo/green.html', '/public_html/foo/blue.html');

$this->ftp->move()

-

Lets you move a file. Supply the source and destination paths:

+

Lets you move a file. Supply the source and destination paths:

// Moves blog.html from "joe" to "fred"
@@ -221,7 +221,7 @@ $this->ftp->move('/public_html/joe/blog.html', '/public_html/fred/blog.html');

$this->ftp->delete_file()

-

Lets you delete a file. Supply the source path with the file name.

+

Lets you delete a file. Supply the source path with the file name.

$this->ftp->delete_file('/public_html/joe/blog.html'); @@ -229,10 +229,10 @@ $this->ftp->delete_file('/public_html/joe/blog.html');

$this->ftp->delete_dir()

-

Lets you delete a directory and everything it contains. Supply the source path to the directory with a trailing slash.

+

Lets you delete a directory and everything it contains. Supply the source path to the directory with a trailing slash.

-

Important  Be VERY careful with this function. It will recursively delete -everything within the supplied path, including sub-folders and all files. Make absolutely sure your path is correct. +

Important  Be VERY careful with this function. It will recursively delete +everything within the supplied path, including sub-folders and all files. Make absolutely sure your path is correct. Try using the list_files() function first to verify that your path is correct.

@@ -242,7 +242,7 @@ $this->ftp->delete_dir('/public_html/path/to/folder/');

$this->ftp->list_files()

-

Permits you to retrieve a list of files on your server returned as an array. You must supply +

Permits you to retrieve a list of files on your server returned as an array. You must supply the path to the desired directory.

@@ -255,7 +255,7 @@ print_r($list);

$this->ftp->mirror()

Recursively reads a local folder and everything it contains (including 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. +mirror via FTP based on it. Whatever the directory structure of the original file path will be recreated on the server. You must supply a source path and a destination path:

@@ -266,7 +266,7 @@ $this->ftp->mirror('/path/to/myfolder/', '/public_html/myfolder/');

$this->ftp->mkdir()

-

Lets you create a directory on your server. Supply the path ending in the folder name you wish to create, with a trailing slash. +

Lets you create a directory on your server. Supply the path ending in the folder name you wish to create, with a trailing slash. Permissions can be set by passed an octal value in the second parameter (if you are running PHP 5).

@@ -277,7 +277,7 @@ $this->ftp->mkdir('/public_html/foo/bar/', DIR_WRITE_MODE);

$this->ftp->chmod()

-

Permits you to set file permissions. Supply the path to the file or folder you wish to alter permissions on:

+

Permits you to set file permissions. Supply the path to the file or folder you wish to alter permissions on:

// Chmod "bar" to 777
@@ -288,7 +288,7 @@ $this->ftp->chmod('/public_html/foo/bar/', DIR_WRITE_MODE);

$this->ftp->close();

-

Closes the connection to your server. It's recommended that you use this when you are finished uploading.

+

Closes the connection to your server. It's recommended that you use this when you are finished uploading.

-- cgit v1.2.3-24-g4f1b