目录文件处理函数之clearstatcache函数-清除缓存

目录文件处理函数之clearstatcache函数--清除缓存

Clearstatcache函数—清除缓存

当应用某些文件操纵函数对文件进行操作时,PHP将缓存这些函数的返回信息以提供更快的性能,还可以应用clearstatcache()函数清除缓存的内容。

【语法】:void clearstatcache(void)

参数为空。

【示例】

<?PHP
       $array = stat(“c:/windows/index.php”);
       Print_r($array);
       Clearstatcache();

【注意】

将返回信息保存到缓存中的文件操作函数有stat(),lstat(),file_exits(),is_writable(),is_readable(),is_executable(),is_file(),is_dir(),is_link(),filectime(),filemtime(),fileinode(),filegroup(),fileowner(),filesize(),filetype(),fileperms().