Expand description
Path functions.
Functionsยง
- basename
- PHP
basename($path, $suffix)(Unix separators), asphp_basename: the last component, trailing slashes ignored, withsuffixremoved when the component ends with it and is longer than it. - dirname
- PHP
dirname($path)(one level, Unix separators), aszend_dirname. - expand_
filepath expand_filepath(): the absolute path PHP opens forpath. A relative path is resolved against the working directory, then.and..components and repeated slashes are removed lexically (a trailing slash stays), without resolving symbolic links.Nonefor an empty path or one longer thanMAXPATHLEN.- file_
get_ contents file_get_contents($path)for a plain file path: the bytes of the file atexpand_filepath(path), orNonewhere PHP returnsfalse(no such file, a directory, no permission). Paths with a NUL byte areNone; PHP functions raise a\ValueErrorfor them before opening.- pathinfo_
extension - PHP
pathinfo($path, PATHINFO_EXTENSION): what follows the last.ofbasename, or an empty string when it has no..