path_join()

 

File: wp-includes/functions.php

function path_join( $base, $path ) {
	if ( path_is_absolute( $path ) ) {
		return $path;
	}

	return rtrim( $base, '/' ) . '/' . ltrim( $path, '/' );
}

参数:path_join( string $base, string $path )

例如,‘给出了相对于$base’的$path。如果$path是绝对路径,则返回完整路径。

Base path.Path relative to $base.

(字符串)具有基路径或绝对路径的路径。

$base

(string)
(Required)
Base path.

$path

(string)
(Required)
Path relative to $base.

{acontent3}

You must log in before being able to contribute a note or feedback.

43.33% (13) 次Baidu访问
53.33% (16) 次Sogou访问
3.33% (1) 次sm访问
  • 蜘蛛:Baidu,13次,更新时间:2019-05-15 08:48:12
  • 蜘蛛:Sogou,16次,更新时间:2019-05-21 03:14:34
  • 蜘蛛:sm,1次,更新时间:2019-05-15 20:38:22

参与评论