In this article, you will learn how to get the target of the symbolic link in PHP. The readlink() function in PHP returns the target of a symbolic link.
what is the syntax of the READLINK function in php?
readlink(linkpath)
Parameter | Description |
---|---|
linkpath | Required. Specifies the link path to check |
examples of the READLINK function
Example 1. In this example, we get the target of a symbolic link.
<?php
echo readlink("/user/testlink");
?>