函式:clearstatcache() |
clearstatcache清除档案状态快取。 语法: void clearstatcache(void); 传回值: 无 函式种类: 档案存取
对作业系统而言,使用 stat() 或 lstat() 二个函式是很耗资源的,尤其是当每次都要重新呼叫 stat() 及 lstat() 二个函式时,更是不经济的方式。因此为节省资源,PHP 系统会将档案状态放在快取记忆体中,以便随时使用。而本函式就是提供清除快取记忆体中档案资讯的函式。受本函式影响的函式有 stat()、lstat()、file_exists()、is_writeable()、is_readable()、is_executable()、is_file()、is_dir()、is_link()、filectime()、fileatime()、filemtime()、fileinode()、filegroup()、fileowner()、filesize()、filetype() 及 fileperms() 等十八个。
stat() lstat() file_exists() is_writeable() is_readable() is_executable() is_file() is_dir() is_link() filectime() fileatime() filemtime() fileinode() filegroup() fileowner() filesize() filetype() fileperms()
|