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

linkinfo

Description

The linkinfo of Filesystem for PHP gets information about a link.

Syntax

linkinfo(
    string $path
): int|false

Parameters

path

Path to the link.

Return

Returns the st_dev field of the Unix C stat structure returned by the lstat system call. Returns a non-negative integer on success, -1 in case the link was not found, or false if an open.base_dir violation occurs.

Examples

1 · success

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';

$return = linkinfo($path);

echo $return;

?>
2065

2 · not found

<?

$path = 'notfound.php';

$return = linkinfo($path);

echo $return;

?>
-1
HomeMenu