path_join()
最后更新于:2021-11-27 18:44:34
path_join( string$base, string$path)Join 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.
源文件
文件: gc-includes/functions.php
function path_join( $base, $path ) {
if ( path_is_absolute( $path ) ) {
return $path;
}
return rtrim( $base, '/' ) . '/' . ltrim( $path, '/' );
}