. */ function path_clean($path) { $pattern = '/(\.\.\/)+/'; return preg_replace($pattern, '', $path); } ?>