function path_join( $base, $path ) {}

Join two filesystem paths together (e.g. ‘give me $path relative to $base’).
If the $path is absolute, then it the full path is returned.


  • string $base
  • string $path

Return values

returns:The path with the base or absolute path.

Source code

function path_join( $base, $path ) {

	if ( path_is_absolute($path) )

		return $path;

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



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: