summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorTaufan Aditya <toopay@taufanaditya.com>2012-03-13 18:02:39 +0100
committerTaufan Aditya <toopay@taufanaditya.com>2012-03-13 18:02:39 +0100
commitf2915f2787170d681a50db39a6650f48eefc8d7b (patch)
treee9baf0684ec486922c75177287bf17e35fd31c3b /user_guide_src/source
parentfc49a657af78b0fb248cc666b162dc894e3e04ba (diff)
New line and changelog correction
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst2
-rw-r--r--user_guide_src/source/helpers/path_helper.rst3
2 files changed, 4 insertions, 1 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 6900279ec..e01cdf391 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -45,7 +45,7 @@ Release Date: Not Released
- Added an optional third parameter to ``force_download()`` that enables/disables sending the actual file MIME type in the Content-Type header (disabled by default).
- Added a work-around in force_download() for a bug Android <= 2.1, where the filename extension needs to be in uppercase.
- form_dropdown() will now also take an array for unity with other form helpers.
- - set_realpath() improvement.
+ - set_realpath() can now also handle file paths as opposed to just directories.
- Database
diff --git a/user_guide_src/source/helpers/path_helper.rst b/user_guide_src/source/helpers/path_helper.rst
index 4a2252834..43caffec2 100644
--- a/user_guide_src/source/helpers/path_helper.rst
+++ b/user_guide_src/source/helpers/path_helper.rst
@@ -30,11 +30,14 @@ 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/php5';
echo set_realpath($directory); // returns "/etc/php5/"
+
$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" \ No newline at end of file