From 13d37ed612ed1a340b6fd5f74dd21ff462bbf47e Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Fri, 17 Oct 2008 07:21:55 +0000 Subject: Description was bas-ackward --- user_guide/helpers/path_helper.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'user_guide/helpers/path_helper.html') 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

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.

-$directory = './../../etc/passwd';
+$directory = '/etc/passwd';
echo set_realpath($directory);
// returns "/etc/passwd"

-$non_existent_directory = './../../path/not/found';
+$non_existent_directory = '/path/to/nowhere';
echo set_realpath($non_existent_directory, TRUE);
-// returns "/path/not/found"
-
+// returns an error, as the path could not be resolved +

echo set_realpath($non_existent_directory, FALSE);
-// returns an error, as the path could not be resolved
+// returns "/path/to/nowhere" + + + +

 

-- cgit v1.2.3-24-g4f1b