From 086ee5a06dc2a9b8273574c8c883efdbaa815765 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Tue, 28 Jul 2009 14:42:12 +0000 Subject: add is_php() to Common.php --- user_guide/general/common_functions.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'user_guide/general') diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 980a5a969..1f4394424 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -59,6 +59,18 @@ Auto-loading Resources

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_php('version_number')

+ +

is_php() determines of the PHP version being used is greater than the supplied version_number.

+ +if (is_php('5.3.0'))
+{
+    $str = quoted_printable_encode($str);
+}
+ +

Returns boolean TRUE if the installed version of PHP is equal to or greater than the supplied version number. Returns FALSE if the installed version of PHP is lower than the supplied version number.

+ +

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.

-- cgit v1.2.3-24-g4f1b