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

ParameterIs RequiredDescription
linkpathRequired.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;
?>




















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions