PHP 中的 fileinode() 函数

phpprogrammingserver side programming

fileinode() 函数返回文件的 inode 编号。如果成功,该函数将返回文件的 inode 编号,如果失败,则返回 FALSE。

语法

fileinode(file_path)

参数

  • file_path − 要检查的文件。

返回

fileinode() 函数如果成功,将返回文件的 inode 编号,如果失败,则返回 FALSE。

下面是例子 −

示例

<?php
   $file_path= new.php';
   if (getmyinode() == fileinode($file_path)) {
      echo 'This is your file!';
   }
?>

以下是输出 −

注意 − 在 Windows 系统上结果可能有所不同。

输出

This is your file!

相关文章