diff options
author | Andrey Andreev <narf@devilix.net> | 2018-06-12 15:45:46 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2018-06-12 15:45:46 +0200 |
commit | 30e2eafa86c4c7b6b39cea3e7089a90df9f603fb (patch) | |
tree | 391bc1e62d8d0ad045e18a6da72e3e2a59e91503 /user_guide_src/source/helpers/path_helper.rst | |
parent | a9da3dd2f16a8f97d7bc4ff5572b28e4bb84c813 (diff) |
[ci skip] 3.1.9 release
Diffstat (limited to 'user_guide_src/source/helpers/path_helper.rst')
-rw-r--r-- | user_guide_src/source/helpers/path_helper.rst | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/user_guide_src/source/helpers/path_helper.rst b/user_guide_src/source/helpers/path_helper.rst deleted file mode 100644 index f46cbad44..000000000 --- a/user_guide_src/source/helpers/path_helper.rst +++ /dev/null @@ -1,53 +0,0 @@ -########### -Path Helper -########### - -The Path Helper file contains functions that permits you to work with -file paths on the server. - -.. contents:: - :local: - -.. raw:: html - - <div class="custom-index container"></div> - -Loading this Helper -=================== - -This helper is loaded using the following code:: - - $this->load->helper('path'); - -Available Functions -=================== - -The following functions are available: - - -.. php:function:: set_realpath($path[, $check_existance = FALSE]) - - :param string $path: Path - :param bool $check_existance: Whether to check if the path actually exists - :returns: An absolute path - :rtype: string - - 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. - - Examples:: - - $file = '/etc/php5/apache2/php.ini'; - echo set_realpath($file); // Prints '/etc/php5/apache2/php.ini' - - $non_existent_file = '/path/to/non-exist-file.txt'; - echo set_realpath($non_existent_file, TRUE); // Shows an error, as the path cannot be resolved - echo set_realpath($non_existent_file, FALSE); // Prints '/path/to/non-exist-file.txt' - - $directory = '/etc/php5'; - echo set_realpath($directory); // Prints '/etc/php5/' - - $non_existent_directory = '/path/to/nowhere'; - echo set_realpath($non_existent_directory, TRUE); // Shows an error, as the path cannot be resolved - echo set_realpath($non_existent_directory, FALSE); // Prints '/path/to/nowhere'
\ No newline at end of file |