PHP readlink() Function

❮ PHP Filesystem Reference

Example

Get the target of a symbolic link:

<?php
echo readlink("/user/testlink");
?>


Definition and Usage

The readlink() function returns the target of a symbolic link.

Syntax

readlink(linkpath)

Parameter Values

Parameter Description
linkpath Required. Specifies the link path to check


Technical Details

Return Value: The target of the link on success, FALSE on failure
PHP Version: 4.0+
PHP Changelog: PHP 5.3: readlink() now available on Windows platforms

❮ PHP Filesystem Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.