Path
class Path (View source)
Path manipulation helpers
Constants
TRIM_CHARS |
|
Methods
public static
string
join(array ...$parts)
Joins one or more paths, normalising all separators to DIRECTORY_SEPARATOR
public static
string
normalise(string $path, bool $relative = false)
Normalise absolute or relative filesystem path.
Details
static string
join(array ...$parts)
Joins one or more paths, normalising all separators to DIRECTORY_SEPARATOR
Note: Errors on collapsed /../
for security reasons. Use realpath() if you need to
join a trusted relative path.
static string
normalise(string $path, bool $relative = false)
Normalise absolute or relative filesystem path.
Important: Single slashes are converted to empty strings (empty relative paths)