summaryrefslogtreecommitdiffstats
path: root/user_guide/general/common_functions.html
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2009-07-28 16:42:12 +0200
committerDerek Jones <derek.jones@ellislab.com>2009-07-28 16:42:12 +0200
commit086ee5a06dc2a9b8273574c8c883efdbaa815765 (patch)
tree9de1aebb62af95c2c397b9826494f3653bfe4001 /user_guide/general/common_functions.html
parent1414987474e8d9a96e640ba9378d447677cfc387 (diff)
add is_php() to Common.php
Diffstat (limited to 'user_guide/general/common_functions.html')
-rw-r--r--user_guide/general/common_functions.html12
1 files changed, 12 insertions, 0 deletions
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
<p>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.</p>
+<h2>is_php('<var>version_number</var>')</h2>
+
+<p>is_php() determines of the PHP version being used is greater than the supplied <var>version_number</var>.</p>
+
+<code>if (is_php('5.3.0'))<br />
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;$str = quoted_printable_encode($str);<br />
+}</code>
+
+<p>Returns boolean <kbd>TRUE</kbd> if the installed version of PHP is equal to or greater than the supplied version number. Returns <kbd>FALSE</kbd> if the installed version of PHP is lower than the supplied version number.</p>
+
+
<h2>is_really_writable('<var>path/to/file</var>')</h2>
<p>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.</p>