Home > PHP > Function > Filesystem > realpath()

realpath()

realpath - Returns canonicalized absolute pathname

Syntax

string realpath (string $path)

Arguments

  • path - The path being checked.

Description

realpath() expands all symbolic links and resolves references to '/./', '/../' and extra '/' characters in the input path and return the canonicalized absolute pathname.

Version

PHP 4, 5

Return value

Returns the canonicalized absolute pathname on success. The resulting path will have no symbolic link, '/./' or '/../' components.