Changeset 23279 for branches/version-2_13-dev/data/class/util
- Timestamp:
- 2013/11/18 15:20:47 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/util/SC_Utils.php
r23124 r23279 2092 2092 return array_reverse($arrTrail); 2093 2093 } 2094 2095 /** 2096 * Obtain the parts of path that are not the same and confirm if file exists 2097 * by reconstructing path with base path. 2098 * 2099 * @param string $file 2100 * @param string $base_path 2101 * @return bool true = exists / false does not exist 2102 */ 2103 public function checkFileExistsWithInBasePath($file,$base_path) 2104 { 2105 $arrPath = explode('/', str_replace('\\', '/',$file)); 2106 $arrBasePath = explode('/', str_replace('\\', '/',$base_path)); 2107 $path_diff = implode("/",array_diff_assoc($arrPath, $arrBasePath)); 2108 return file_exists(realpath(str_replace('..','',$base_path . $path_diff))) ? true : false; 2109 } 2094 2110 }
Note: See TracChangeset
for help on using the changeset viewer.
