函数原型
path_join( string $base, string $path ): string
函数描述
Joins two filesystem paths together.
是否弃用
未弃用
函数参数
-
$base
string
Required - Base path.
-
$path
string
Required - Path relative to $base.
函数返回值
string The path with the base or absolute path.
函数位置
File: wp-includes/functions.php.
函数源码
function path_join( $base, $path ) {
if ( path_is_absolute( $path ) ) {
return $path;
}
return rtrim( $base, '/' ) . '/' . $path;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |

