CodeIgniter uses a few functions for its operation that are globally defined, and are available to you at any point. These do not require loading any libraries or helpers.
+
is_really_writable('path/to/file')
+
is_writable() returns TRUE on Windows servers when you really can't write to the file as the OS reports to PHP as FALSE only if the read-only attribute is marked. This function determines if a file is actually writable by attempting to write to it first. Generally only recommended on platforms where this information may be unreliable.
+if (is_really_writable('file.txt'))
+{
+ echo "I could write to this if I wanted to";
+}
+else
+{
+ echo "File is not writable";
+}
+
config_item('item_key')
+
The Config library is the preferred way of accessing configuration information, however config_item() can be used to retrieve single keys. See Config library documentation for more information.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html
index 2dac6e0d7..4c0c506af 100644
--- a/user_guide/general/controllers.html
+++ b/user_guide/general/controllers.html
@@ -359,50 +359,7 @@ Constructors can't return a value, but they can do some default work.
Since your controller classes will extend the main application controller you
must be careful not to name your functions identically to the ones used by that class, otherwise your local functions
-will override them. The following
-is a list of reserved names. Do not name your controller functions any of these:
-
-
-
Controller
-
CI_Base
-
_ci_initialize
-
_ci_scaffolding
-
-
-
If you are running PHP 4 there are some additional reserved names. These ONLY apply if you are running PHP 4.
-
-
-
CI_Loader
-
config
-
database
-
dbutil
-
dbforge
-
file
-
helper
-
helpers
-
language
-
library
-
model
-
plugin
-
plugins
-
scaffolding
-
script
-
view
-
vars
-
_ci_assign_to_models
-
_ci_autoloader
-
_ci_init_class
-
_ci_init_scaffolding
-
_ci_is_instance
-
_ci_load
-
_ci_load_class
-
_ci_object_to_array
-
-
-
-
-
-
+will override them. See Reserved Names for a full list.
That's it!
@@ -416,12 +373,11 @@ is a list of reserved names. Do not name your controller functions any of these
diff --git a/user_guide/general/reserved_names.html b/user_guide/general/reserved_names.html
new file mode 100644
index 000000000..60bdec2fc
--- /dev/null
+++ b/user_guide/general/reserved_names.html
@@ -0,0 +1,151 @@
+
+
+
+
+Reserved Names : CodeIgniter User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
In order to help out, CodeIgniter uses a series of functions and names in its operation. Because of this, some names cannot be used by a developer. Following is a list of reserved names that cannot be used.
+
Controller names
+
Since your controller classes will extend the main application controller you
+must be careful not to name your functions identically to the ones used by that class, otherwise your local functions
+will override them. The following
+is a list of reserved names. Do not name your controller functions any of these:
+
+
Controller
+
CI_Base
+
_ci_initialize
+
_ci_scaffolding
+
+
+ If you are running PHP 4 there are some additional reserved names. These ONLY apply if you are running PHP 4.
+
+
CI_Loader
+
config
+
database
+
dbutil
+
dbforge
+
file
+
helper
+
helpers
+
language
+
library
+
model
+
plugin
+
plugins
+
scaffolding
+
script
+
view
+
vars
+
_ci_assign_to_models
+
_ci_autoloader
+
_ci_init_class
+
_ci_init_scaffolding
+
_ci_is_instance
+
_ci_load
+
_ci_load_class
+
_ci_object_to_array
+
+
Functions
+
+
is_really_writable
+
config_item
+
show_error
+
show_404
+
log_message
+
_exception_handler
+
+
Variables
+
+
config
+
mimes
+
+
Constants
+
+
CI_VERSION
+
EXT
+
FCPATH
+
SELF
+
BASEPATH
+
APPPATH
+
FILE_READ_MODE
+
FILE_WRITE_MODE
+
DIR_READ_MODE
+
DIR_WRITE_MODE
+
FOPEN_READ
+
FOPEN_READ_WRITE
+
FOPEN_WRITE_CREATE_DESTRUCTIVE
+
FOPEN_READ_WRITE_CREATE_DESTRUCTIVE
+
FOPEN_WRITE_CREATE
+
FOPEN_READ_WRITE_CREATE
+
FOPEN_WRITE_CREATE_STRICT
+
FOPEN_READ_WRITE_CREATE_STRICT
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/user_guide/general/scaffolding.html b/user_guide/general/scaffolding.html
index 764e3b4cf..7dc66d1d8 100644
--- a/user_guide/general/scaffolding.html
+++ b/user_guide/general/scaffolding.html
@@ -104,7 +104,7 @@ class Blog extends Controller {
function Blog()
{
parent::Controller();
- $this->load->scaffolding('table_name');
+ $this->load->scaffolding('table_name');
}
}
?>
@@ -135,12 +135,10 @@ database functions.
diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html
index 9902083fa..8ba46e3d8 100644
--- a/user_guide/general/urls.html
+++ b/user_guide/general/urls.html
@@ -145,8 +145,7 @@ Previous Topic: Getting Started
·
Top of Page ·
User Guide Home ·
-Next Topic: Controllers
-
+Next Topic: Reserved Names
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.
diff --git a/user_guide/nav/nav.js b/user_guide/nav/nav.js
index 88992804f..e82429943 100644
--- a/user_guide/nav/nav.js
+++ b/user_guide/nav/nav.js
@@ -42,6 +42,7 @@ function create_menu(basepath)
'