get_filesystem_method()
get_filesystem_method( array $args = array(), string $c…
get_filesystem_method( array $args = array(), string $context = ”, bool $allow_relaxed_file_ownership = false )
确定用于读取、写入、修改或删除文件系统上的文件的方法。
Determines which method to use for reading, writing, modifying, or deleting files on the filesystem.
确定用于读取、写入、修改或删除文件系统上的文件的方法。
Determines which method to use for reading, writing, modifying, or deleting files on the filesystem.
目录锚点:#说明#参数#返回#源码
说明(Description)
传输的优先级是:Direct、SSH2、FTP PHP扩展、FTP Sockets(通过Sockets类或fsockopen())。有效值为:“direct”、“ssh2”、“ftpext”或“ftpsockets”。
可以通过在wp中定义FS_METHOD常量来重写返回值-配置.php,或通过“文件系统方法”进行筛选。
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$args | (array) | 可选 | 连接详细信息。 |
$context | (string) | 可选 | 测试为可写的目录的完整路径。 |
$allow_relaxed_file_ownership | (bool) | 可选 | 是否允许组/世界可写。 |
返回(Return)
(string)要使用的传输,请参阅说明以获取有效的返回值。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.5.0 | wp-admin/includes/file.php:1869 | 4 | 3 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!