HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

is_link

Description

The is_link of Filesystem for PHP tells whether the filename is a symbolic link.

Syntax

is_link(
    string $filename
): bool

Parameters

filename

Path to the file.

Return

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

Examples

1 · filename

<?

$target = "uploads.php";
$filename = "uploads";
symlink($target, $filename);

$return = is_link($filename);

if($return)
{
    echo readlink($filename);
}

unlink($filename);