PHP realpath()Functions
Complete PHP Filesystem Reference Manual
Definition and Usage
The realpath() function returns the absolute path.
This function removes all symbolic links (such as '/./', '/../' and extra '/'), and returns the absolute pathname.
If it fails, the function returns FALSE.
Syntax
realpath(path)
| Parameters | Description |
|---|---|
| path | Required. Specifies the path to be checked. |
Examples
<?php
echo realpath("test.txt");
?>
echo realpath("test.txt");
?>
The above code will output:
C:Inetpubtestwebtest.txt
Complete PHP Filesystem Reference Manual Other Extensions