Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




path_join [ WordPress Function ]

path_join ( $base, $path )
Parameters:
  • (string) $base
  • (string) $path
Returns:
  • (string) The path with the base or absolute path.
Defined at:



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.

Source


<?php
function path_join$base$path ) {
    if ( 
path_is_absolute($path) )
        return 
$path;

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

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics