The realpath() function returns the absolute pathname. It returns the absolute pathname on success and False on failure.
Syntax
realpath(path)
Parameters
path − The path to check. Required.
Return
The realpath() function returns the absolute pathname on success and False on failure.
Example
<?php echo realpath("new.txt"); ?>
Output
D:\tutorials\java\new.txt