diff options
author | Taufan Aditya <toopay@taufanaditya.com> | 2012-03-12 15:03:37 +0100 |
---|---|---|
committer | Taufan Aditya <toopay@taufanaditya.com> | 2012-03-12 15:03:37 +0100 |
commit | 89338828264a6b50e0eb63c449a96f14f0f84076 (patch) | |
tree | 5e89cbdeb75f41a7f33d0b4e32997533eb4aafd3 /user_guide_src/source/helpers | |
parent | 5f98a1091c70e29c7596917604ec478aea443122 (diff) |
Path helper improvement
Diffstat (limited to 'user_guide_src/source/helpers')
-rw-r--r-- | user_guide_src/source/helpers/path_helper.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/user_guide_src/source/helpers/path_helper.rst b/user_guide_src/source/helpers/path_helper.rst index 1a70af458..6efd93cc1 100644 --- a/user_guide_src/source/helpers/path_helper.rst +++ b/user_guide_src/source/helpers/path_helper.rst @@ -28,10 +28,13 @@ cannot be resolved. :: + $file = '/etc/php5/apache2/php.ini'; + echo set_realpath($file); // returns "/etc/php5/apache2/php.ini" + $non_existent_file = '/path/to/non-exist-file.txt'; + echo set_realpath($non_existent_file, TRUE); // returns an error, as the path could not be resolved + echo set_realpath($non_existent_file, FALSE); // returns "/path/to/non-exist-file.txt" $directory = '/etc/passwd'; - echo set_realpath($directory); // returns "/etc/passwd" + echo set_realpath($directory); // returns "/etc/passwd/" $non_existent_directory = '/path/to/nowhere'; echo set_realpath($non_existent_directory, TRUE); // returns an error, as the path could not be resolved - echo set_realpath($non_existent_directory, FALSE); // returns "/path/to/nowhere" - - + echo set_realpath($non_existent_directory, FALSE); // returns "/path/to/nowhere"
\ No newline at end of file |