您好,欢迎访问一九零五行业门户网

在PHP中的clearstatcache()函数

clearstatcache() 函数用于清除文件状态缓存。
php 缓存以下函数返回的信息 −
stat()lstat()file_exists()is_writable()is_readable()is_executable()is_file()is_dir()filegroup()fileowner()filesize()filetype()fileperms()这样做是为了提供更好的性能。
语法void clearstatecache()
参数na返回值clearstatcache()函数不返回任何值。
示例以下是一个示例,用于检查文件“tmp.txt”并清除缓存。
在线演示
<?php $file = fopen("tmp.txt", "a+"); // clear cache clearstatcache(); echo "cache cleared!";?>
输出cache cleared!
以上就是在php中的clearstatcache()函数的详细内容。
其它类似信息

推荐信息