(2003-2009) * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions * @version $Id$ */ /** * Function which returns a secure path, means to remove all multiple dots and slashes * * @param string The path * @return string The corrected path * @author Florian Lippert */ function makeSecurePath($path) { $search = Array( '#/+#', '#\.+#', '#\0+#' ); $replace = Array( '/', '.', '' ); $path = preg_replace($search, $replace, $path); return $path; }