| @@ 188-204 (lines=17) @@ | ||
| 185 | } | |
| 186 | } | |
| 187 | ||
| 188 | if(!function_exists('removeLastPath')) { | |
| 189 | /** | |
| 190 | * @param string $string | |
| 191 | * @return bool|string | |
| 192 | */ | |
| 193 | function removeLastPath($string) | |
| 194 |     { | |
| 195 | $pos = strrpos($string, '/'); | |
| 196 |         if ($pos !== false) { | |
| 197 | $path = substr($string, 0, $pos); | |
| 198 |         } else { | |
| 199 | $path = false; | |
| 200 | } | |
| 201 | ||
| 202 | return $path; | |
| 203 | } | |
| 204 | } | |
| 205 | ||
| 206 | if(!function_exists('getExtension')) { | |
| 207 | /** | |
| @@ 206-223 (lines=18) @@ | ||
| 203 | } | |
| 204 | } | |
| 205 | ||
| 206 | if(!function_exists('getExtension')) { | |
| 207 | /** | |
| 208 | * @param string $string | |
| 209 | * @return bool|string | |
| 210 | */ | |
| 211 | function getExtension($string) | |
| 212 |     { | |
| 213 | $pos = strrpos($string, '.'); | |
| 214 |         if ($pos !== false) { | |
| 215 | $ext = substr($string, $pos); | |
| 216 | $ext = strtolower($ext); | |
| 217 |         } else { | |
| 218 | $ext = false; | |
| 219 | } | |
| 220 | ||
| 221 | return $ext; | |
| 222 | } | |
| 223 | } | |
| 224 | ||
| 225 | if(!function_exists('checkExtension')) { | |
| 226 | /** | |