PHP - Bug Fix Required Path
Bug Fix Required Path (Corrige o bug no caminho do arquivo)
Copy this code and paste it in your HTML
{
function bugFixRequirePath($newPath)
{
if (strstr($stringPath,":")) $stringExplode = "\\";
else $stringExplode = "/";
$paths = explode($stringExplode,$stringPath);
if (count($newPaths) > 0) {
for($i=0;
$i<count
($newPaths);
$i++) { if ($newPaths[$i] == "..") array_pop($paths);
} for($i=0;
$i<count
($newPaths);
$i++) { if ($newPaths[$i] == "..") unset($newPaths[$i]);
} $stringNewPath = implode($stringExplode,$paths).$stringExplode.implode($stringExplode,$newPaths);
return $stringNewPath;
}
}
}
Report this snippet