From ee0a7f0083e9e3e2e667211acd3909e71aa1ec47 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Thu, 8 May 2008 13:59:27 +0000 Subject: Added a Reserved Names page to the userguide, and migrated reserved controller names into it. Added a Common Functions page to the userguide for globally available functions. --- user_guide/helpers/file_helper.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'user_guide/helpers') diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html index a88e5dfc9..3fa92462b 100644 --- a/user_guide/helpers/file_helper.html +++ b/user_guide/helpers/file_helper.html @@ -134,11 +134,14 @@ can optionally be added to the file names by setting the second parameter to TRU

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('path/to/file/')

+

get_mime_by_extension('file')

Translates a file extension into a mime type based on config/mimes.php. Returns FALSE if it can't determine the type, or open the mime config 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.

+

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

-- cgit v1.2.3-24-g4f1b