Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP realpath() Function

PHP realpath() Function


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual


Definition and Usage

The realpath() function returns an absolute path.

This function removes all symbolic links (such as '/./', '/../', and extra '/') and returns the absolute path name.

Returns FALSE on failure.

Syntax

realpath(path)

Parameters Description
path Required. Specifies the path to check.

Example

The code above will output:

C:Inetpubtestwebtest.txt


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual