Jump to: navigation, search

Php linkinfo

From w3cyberlearnings

Contents

PHP function linkinfo

This function returns hard link information.

Syntax linkinfo

hlink is a hard link file name.

linkinfo(hlink);

Note

linkinfo() returns the st_dev field of the Unix C stat structure returned by the lstat system call. Returns 0 or FALSE in case of error.

Example 1

<?php
  $target = "glob.php";
  $hlink ="glob23i.html";
  link($target, $hlink);

  echo linkinfo($hlink);
?>

Output

2049

Check result using stat command in linux

root@sophal-desktop:/home/sophal/testphp# stat glob23i.html
  File: `glob23i.html'
  Size: 44        	Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d	Inode: 213208      Links: 2
Access: (0644/-rw-r--r--)  Uid: ( 1000/  sophal)   Gid: ( 1000/  sophal)
Access: 2012-06-10 14:15:55.000000000 -0400
Modify: 2012-06-10 14:15:53.000000000 -0400
Change: 2012-06-10 17:53:23.000000000 -0400

Related Links


basename-- chgrp-- chmod-- chown-- clearstatcache-- copy-- delete-- dirname-- disk_free_space-- disk_total_space-- diskfreespace-- fclose-- feof-- fflush-- fgetc-- fgetcsv-- fgets-- fgetss-- file_exists-- file_get_contents-- file_put_contents- file-- fileatime-- filectime-- filegroup-- fileinode-- filemtime-- fileowner-- fileperms-- filesize-- filetype-- flock-- fnmatch-- fopen-- fpassthru-- fputcsv-- fputs-- fread-- fscanf-- fseek-- fstat-- ftell-- ftruncate-- fwrite-- glob-- is_dir-- is_executable-- is_file-- is_link-- is_readable-- is_uploaded_file-- is_writable-- is_writeable-- lchgrp-- lchown-- link-- linkinfo-- lstat-- mkdir-- move_uploaded_file-- parse_ini_file-- parse_ini_string-- pathinfo-- pclose-- popen-- readfile-- readlink-- realpath_cache_get-- realpath_cache_size-- realpath-- rename-- rewind-- rmdir-- set_file_buffer-- stat-- symlink-- tempnam-- tmpfile-- touch-- umask-- unlink--

Navigation
Web
SQL
MISC
References