<?php
$pathinfo = "/abc/fed//..";
$filename = "/zzz/...";
$path = $pathinfo . "/" . $filename . "/";
$path = preg_replace('/[\\/]+/', '/', $path);
$path = preg_replace('/\/$/', '', $path);
echo $path . "\n";
$path = realpath($path);
echo $path;
?>
Title:
Normalizes the slashes in an path
Description:
<?php $pathinfo = "/abc/fed//.."; $filename = "/zzz/..."; $path = $pathinfo . "/" . $filename . "/...
...
Rating:
4