PHP function realpath()

Availability in PHP 4.0

Returns canonicalized absolute pathname

Parameters

Parameter Data type Default value Note
$path string not The path being checked.

Return values

string

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

realpath returns false on failure, e.g. if the file does not exist.

Additional resources

Official realpath documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.