diff options
Diffstat (limited to 'user_guide/helpers')
-rw-r--r-- | user_guide/helpers/path_helper.html | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/user_guide/helpers/path_helper.html b/user_guide/helpers/path_helper.html index 78815a256..ca3fb646a 100644 --- a/user_guide/helpers/path_helper.html +++ b/user_guide/helpers/path_helper.html @@ -72,16 +72,20 @@ Path Helper <p>Checks to see if the path exists. This function will return a server path without symbolic links or relative directory structures. An optional second argument will cause an error to be triggered if the path cannot be resolved.</p>
-<code>$directory = './../../etc/passwd';<br />
+<code>$directory = '/etc/passwd';<br />
echo set_realpath($directory);<br />
// returns "/etc/passwd"<br />
<br />
-$non_existent_directory = './../../path/not/found';<br />
+$non_existent_directory = '/path/to/nowhere';<br />
echo set_realpath($non_existent_directory, TRUE);<br />
-// returns "/path/not/found"<br />
-<br />
+// returns an <strong>error</strong>, as the path could not be resolved
+<br /><br />
echo set_realpath($non_existent_directory, FALSE);<br />
-// returns an <strong>error</strong>, as the path could not be resolved</code>
+// returns "/path/to/nowhere"
+
+
+
+</code>
<h2> </h2>
</div>
<!-- END CONTENT -->
|