Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

readlink()

Example

Retrieve the target of a symbolic link.

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

Definition and Usage

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

Syntax

readlink(linkpath)

Parameter Values

Parameter

Description

linkpath

Required. Specifies the path of the symbolic link to check.

Technical Details

Return Value:

Returns the target of the link on success; FALSE on failure.

PHP Version:

4.0+

PHP Changelog:

Starting with PHP 5.3, readlink() is available on Windows platforms.