The realpath() function returns the absolute pathname.This function removes all symbolic links (like '/./', '/../' and extra '/') and returns the absolute pathname.This function returns FALSE on failure.
string realpath ( string $path )
realpath() expands all symbolic links and resolves references to /./, /../ and extra / characters in the input path and returns the canonicalized absolute pathname.
The above example will output : -
/etc/passwd /tmp
The above example will output : -
C:\WINDOWS\System32 C:\Program Files
Parameter | Description |
---|---|
path | The path being checked. |
Whilst a path must be supplied, the value can be blank or NULL In these cases, the value is interpreted as the current directory.