From 1f622294b92c095fd91e8ca44912d405c1605ded Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Thu, 7 Apr 2011 12:06:51 -0400 Subject: Wow, I screwed that up, Reactor is going to 2.0.2 not 2.0.1 --- user_guide/helpers/file_helper.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/helpers/file_helper.html') diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html index 6f61f428b..c37235424 100644 --- a/user_guide/helpers/file_helper.html +++ b/user_guide/helpers/file_helper.html @@ -27,7 +27,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

-- cgit v1.2.3-24-g4f1b 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/helpers/file_helper.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'user_guide/helpers/file_helper.html') diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html index c37235424..2d06fa25b 100644 --- a/user_guide/helpers/file_helper.html +++ b/user_guide/helpers/file_helper.html @@ -69,11 +69,11 @@ File Helper

read_file('path')

-

Returns the data contained in the file specified in the path. Example:

+

Returns the data contained in the file specified in the path. Example:

$string = read_file('./path/to/file.php'); -

The path can be a relative or full server path. Returns FALSE (boolean) on failure.

+

The path can be a relative or full server path. Returns FALSE (boolean) on failure.

Note: The path is relative to your main site index.php file, NOT your controller or view files. CodeIgniter uses a front controller so paths are always relative to the main site index.

@@ -83,7 +83,7 @@ might not work if you are trying to access a file above the calling script.

write_file('path', $data)

-

Writes data to the file specified in the path. If the file does not exist the function will create it. Example:

+

Writes data to the file specified in the path. If the file does not exist the function will create it. Example:

$data = 'Some file data';
@@ -101,7 +101,7 @@ else
write_file('./path/to/file.php', $data, 'r+'); -

The default mode is wb. Please see the PHP user guide for mode options.

+

The default mode is wb. Please see the PHP user guide for mode options.

Note: In order for this function to write data to a file its file permissions must be set such that it is writable (666, 777, etc.). If the file does not already exist, the directory containing it must be writable.

@@ -111,7 +111,7 @@ CodeIgniter uses a front controller so paths are always relative to the main sit

delete_files('path')

-

Deletes ALL files contained in the supplied path. Example:

+

Deletes ALL files contained in the supplied path. Example:

delete_files('./path/to/directory/');

If the second parameter is set to true, any directories contained within the supplied root path will be deleted as well. Example:

@@ -127,12 +127,12 @@ can optionally be added to the file names by setting the second parameter to TRU

get_dir_file_info('path/to/directory/', $top_level_only = TRUE)

-

Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Sub-folders contained within the specified path are only read if forced +

Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Sub-folders contained within the specified path are only read if forced by sending the second parameter, $top_level_only to FALSE, as this can be an intensive operation.

get_file_info('path/to/file', $file_information)

-

Given a file and path, returns the name, path, size, date modified. Second parameter allows you to explicitly declare what information you want returned; options are: name, server_path, size, date, readable, writable, executable, fileperms. Returns FALSE if the file cannot be found.

+

Given a file and path, returns the name, path, size, date modified. Second parameter allows you to explicitly declare what information you want returned; options are: name, server_path, size, date, readable, writable, executable, fileperms. Returns FALSE if the file cannot be found.

Note: The "writable" uses the PHP function is_writable() which is known to have issues on the IIS webserver. Consider using fileperms instead, which returns information from PHP's fileperms() function.

get_mime_by_extension('file')

@@ -142,7 +142,7 @@ can optionally be added to the file names by setting the second parameter to TRU $file = "somefile.png";
echo $file . ' is has a mime type of ' . get_mime_by_extension($file);

-

Note: This is not an accurate way of determining file mime types, and is here strictly as a convenience. It should not be used for security.

+

Note: This is not an accurate way of determining file mime types, and is here strictly as a convenience. It should not be used for security.

symbolic_permissions($perms)

-- cgit v1.2.3-24-g4f1b