summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/common_functions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/general/common_functions.rst')
-rw-r--r--user_guide_src/source/general/common_functions.rst16
1 files changed, 14 insertions, 2 deletions
diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst
index 32e8a8be0..2dfec9cc0 100644
--- a/user_guide_src/source/general/common_functions.rst
+++ b/user_guide_src/source/general/common_functions.rst
@@ -96,11 +96,10 @@ please see the :doc:`Error Handling <errors>` documentation.
log_message()
=============
-.. php:function:: log_message($level, $message, $php_error = FALSE)
+.. php:function:: log_message($level, $message)
:param string $level: Log level: 'error', 'debug' or 'info'
:param string $message: Message to log
- :param bool $php_error: Whether we're logging a native PHP error message
:returns: void
This function is an alias for ``CI_Log::write_log()``. For more info,
@@ -174,6 +173,19 @@ is_https()
Returns TRUE if a secure (HTTPS) connection is used and FALSE
in any other case (including non-HTTP requests).
+is_cli()
+========
+
+.. php:function:: is_cli()
+
+ :returns: bool
+
+Returns TRUE if the application is run through the command line
+and FALSE if not.
+
+.. note:: This function checks both if the ``PHP_SAPI`` value is 'cli'
+ or if the ``STDIN`` constant is defined.
+
function_usable()
=================