From 466039ab97e67a23168798731084d4127c7f30a1 Mon Sep 17 00:00:00 2001
From: Derek Allard
Date: Mon, 11 Feb 2008 12:46:24 +0000
Subject: added Path Helper
---
user_guide/changelog.html | 1 +
user_guide/helpers/html_helper.html | 3 +-
user_guide/helpers/path_helper.html | 102 ++++++++++++++++++++++++++++++++
user_guide/helpers/security_helper.html | 5 +-
4 files changed, 106 insertions(+), 5 deletions(-)
create mode 100644 user_guide/helpers/path_helper.html
(limited to 'user_guide')
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index bf31475f5..48e2a031a 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -77,6 +77,7 @@ Change Log
- Modified xss_clean() to be more intelligent with its handling of URL encoded strings.
- Added $_SERVER, $_FILES, $_ENV, and $_SESSION to sanitization of globals.
+ - Added a Path Helper.
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html
index 1936cd1f7..e3558f7ce 100644
--- a/user_guide/helpers/html_helper.html
+++ b/user_guide/helpers/html_helper.html
@@ -256,8 +256,7 @@ Previous Topic: Form Helper
·
Top of Page ·
User Guide Home ·
-Next Topic: Inflector Helper
-
+Next Topic:
+
+
+
Path Helper
+
+
The Path Helper file contains functions that permits you to work with file paths on the server.
+
+
+
Loading this Helper
+
+
This helper is loaded using the following code:
+
$this->load->helper('path');
+
+
The following functions are available:
+
+
+
set_realpath()
+
+
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';
+echo set_realpath($directory);
+// returns "/etc/passwd"
+
+$non_existent_directory = './../../path/not/found';
+echo set_realpath($non_existent_directory, TRUE);
+// returns "/path/not/found"
+
+echo set_realpath($non_existent_directory, FALSE);
+// returns an error, as the path could not be resolved
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/user_guide/helpers/security_helper.html b/user_guide/helpers/security_helper.html
index 5a02ee3cc..cb9bf3d66 100644
--- a/user_guide/helpers/security_helper.html
+++ b/user_guide/helpers/security_helper.html
@@ -113,12 +113,11 @@ $str = dohash($str, 'md5'); // MD5
--
cgit v1.2.3-24-g4f1b