ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
Inotify 扩展提供了一系列 inotify 函数:[inotify\_init()](https://www.php.net/manual/zh/function.inotify-init.php)、[inotify\_add\_watch()](https://www.php.net/manual/zh/function.inotify-add-watch.php)、[inotify\_rm\_watch()](https://www.php.net/manual/zh/function.inotify-rm-watch.php)。 类似 C 语言里的[inotify\_init()](https://www.php.net/manual/zh/function.inotify-init.php)函数会返回文件描述符,PHP 的[inotify\_init()](https://www.php.net/manual/zh/function.inotify-init.php)则返回 stream 资源。可以被标准的 Steam 函数使用,例如[stream\_select()](https://www.php.net/manual/zh/function.stream-select.php)、[stream\_set\_blocking()](https://www.php.net/manual/zh/function.stream-set-blocking.php)以及[fclose()](https://www.php.net/manual/zh/function.fclose.php)。[inotify\_read()](https://www.php.net/manual/zh/function.inotify-read.php)函数取代里 C 语言里读取 inotify 事件的那种方式。 [https://pecl.php.net/package/inotify](https://pecl.php.net/package/inotify)