stream_supports_lock

(PHP 5 >= 5.3.0, PHP 7)

stream_supports_lockTells whether the stream supports locking.

说明

bool stream_supports_lock ( resource $stream )

Tells whether the stream supports locking through flock().

参数

stream

The stream to check.

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE

参见

  • flock() - 轻便的咨询文件锁定

User Contributed Notes

romain dot ardiet at gmail dot com 24-Oct-2014 05:54
This method returns TRUE on custom wrappers by default if you don't implement the stream_lock() method inside the wrapper : http://php.net/manual/en/streamwrapper.stream-lock.php
derkontrollfreak+9hy5l at gmail dot com 25-Aug-2014 06:09
stream_supports_lock() always returns TRUE on custom wrappers.