定义

fileinode()函数返回指定文件的inode编号。

 

语法

PHP fileinode()函数具有以下语法。

fileinode(filename)

 

参数

参数 是否必须 描述
filename 需要。 要检查的文件

 

返回值

成功时此函数返回文件的inode编号,失败时返回FALSE。

 

注意

此函数的结果会被缓存。使用clearstatcache()清除缓存。

此函数在Windows系统上不会产生有用的结果。

 

实例

<?php
/*
http://www.manongjc.com/article/1784.html
作者:码农教程
*/
$filename = \'test.txt\';
if (getmyinode() == fileinode($filename)) {
    echo \'You are checking the current file.\';
}

echo fileinode(\"test.txt\");
?>

上面的代码生成以下结果:

You are checking the current file.0

收藏 打印