Gen. partnerAlgotech

PHP function realpath()

Returns canonicalized absolute pathname

|
September 11, 2019

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

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.