realpath
Returns the normalized absolute path name
realpath()
function returns an absolute path.
This function deletes all symbolic connections (such as '/./', '/../' and redundant '/') and returns the absolute pathname.
If it fails, return false. For example, if the file does not exist.
<?php echo realpath ( "test.txt" ) ; ?>
Output:
C:\Inetpub\testweb\test.txt
readlink ( linkpath )
parameter | describe |
---|---|
linkpath | Required. Specify the connection path to be checked. |
On BSD systems, if linkpaths are just not present, PHP does not return false like other systems.