PHP readlink() Function
Definition
The readlink() function returns the target of a symbolic link.
Syntax
PHP readlink() Function has the following syntax.
readlink(linkpath)
Parameter
Parameter | Is Required | Description |
---|---|---|
linkpath | Required. | Link path to check |
Return
This function returns the target of the link on success, or FALSE on failure.
Note
This function is not implemented on Windows platforms.
Example
PHP readlink() function takes a link name and returns the target that the link points to.
<?php
$target = readlink("/home/andrew/myfile.txt");
print $target;
?>