関数 path_join()
定義ファイル :/blog/wp-includes/functions.php 9
path_join()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /** * Join two filesystem paths together. * * For example, 'give me $path relative to $base'. If the $path is absolute, * then it the full path is returned. * * @since 2.5.0 * * @param string $base Base path. * @param string $path Path relative to $base. * @return string The path with the base or absolute path. */ function path_join( $base, $path ) { if ( path_is_absolute($path) ) return $path; return rtrim($base, '/') . '/' . ltrim($path, '/'); } |