Example
Returns the absolute pathname:
html
<?php
echo realpath("test.txt");
?>
The output of the code above will be:
text
C:\Inetpub\testweb\test.txt
Definition and Usage
The realpath() function returns the absolute pathname.
This function removes all symbolic links (like '/./', '/../' and extra '/') and returns the absolute pathname.
Syntax
text
realpath(path)
Parameter Values
| Parameter | Description |
|---|---|
| path | Required. Specifies the path to check |
Technical Details
| Return Value: | The absolute pathname on success, FALSE on failure |
|---|---|
| PHP Version: | 4.0+ |