readlink

(PHP 4, PHP 5, PHP 7)
Returns the target of a symbolic link
string readlink ( string $path )

readlink() does the same as the readlink C function.

Parameters:
path

The symbolic link path.

Returns:

Returns the contents of the symbolic link path or FALSE on error.

Changelog:
5.3.0

This function is now available on Windows platforms (Vista, Server 2008 or greater).

Examples:
readlink() example
<?php

// output e.g. /boot/vmlinux-2.4.20-xfs
echo readlink('/vmlinuz');

?>

See also:

is_link() -

symlink() -

linkinfo() -

doc_php
2016-02-24 15:56:58
Comments
Leave a Comment

Please login to continue.