Gets information about a link
Syntax
linkinfo ( string $path ) : int
Parameters
path
Path to the link.
Return
linkinfo() 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
<? $path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/file.txt'; $return = linkinfo($path); echo $return; ?>
2065
2
<? $path = 'notfound.php'; $return = linkinfo($path); echo $return; ?>
-1