File Directory Php



if (isset($_POST['posted'])) {
   $path = $_POST['path'];
   $outpath = ereg_replace("\.[\.]+", "", $path);
   $outpath = ereg_replace("^[\/]+", "", $outpath);
   $outpath = ereg_replace("^[A-Za-z][:\|][\/]?", "", $outpath);
   echo "The old path is " . $path . " and the new path is " . $outpath;
}
?>
" method="POST">

Enter your file path for cleaning: