The fileinode() function returns the inode number of a file. The function returns the file’s inode number on success, whereas it returns FALSE on failure.
Syntax
fileinode(file_path)
Parameters
file_path − The file to be checked.
Return
The fileinode() function returns the file’s inode number on success, whereas it returns FALSE on failure.
The following is an example −
Example
<?php $file_path= new.php'; if (getmyinode() == fileinode($file_path)) { echo 'This is your file!'; } ?>
The following is the output −
Note − The result may vary on Windows system.
Output
This is your file!