PHP realpath () function
Definition and Usage
realpath () function returns the absolute path.
This function deletes all symbolic links (such as '/./', '/../' and extra '/'), and returns the absolute pathname.
If this fails, the function returns FALSE.
grammar
realpath(path)
参数 | 描述 |
---|---|
path | 必需。规定要检查的路径。 |
Examples
<?php
echo realpath("test.txt");
?>
echo realpath("test.txt");
?>
The code above will output:
C:Inetpubtestwebtest.txt
Complete PHP Filesystem Reference Manual