realpath: Returns canonicalized absolute pathname : File « File Directory « PHP






realpath: Returns canonicalized absolute pathname

<?php
   $imgPath = "./text.txt";
   $absolutePath = realpath($imgPath);

   echo $absolutePath;
?>


           
       








Related examples in the same category

1.dirname: get the directory name for a file
2.File base name