确定目录是否可写。
原型
wp_is_writable( string $path )
描述
此函数用于解决主要影响Windows服务器的PHP中的某些ACL问题。
参考:
- win_is_writable()
参数
$path
(string)
(Required)
检查写能力的路径。
返回值
(bool)
路径是否可写。
源文件
路径:wp-includes/functions.php
<?php
...
function wp_is_writable( $path ) {
if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) )
return win_is_writable( $path );
else
return @is_writable( $path );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_is_writable/