PHP.nl

is_link

is_link

Tells whether the filename is a symbolic link

bool **is_link** string $filename

Tells whether the given file is a symbolic link.

filenamePath to the file.

Returns true if the filename exists and is a symbolic link, false otherwise.

Voorbeeld: Create and confirm if a file is a symbolic link

<?php
$link = 'uploads';

if (is_link($link)) {
    echo readlink($link);
} else {
    symlink('uploads.php', $link);
}
?>

is_dir``is_file``readlink``symlink