PHP » GoLang |
login |
register |
about
|
pathinfo(PHP 4 >= 4.0.3, PHP 5, PHP 7) pathinfo — Returns information about a file path Description
mixed pathinfo
( string
$path
[, int $options = PATHINFO_DIRNAME | PATHINFO_BASENAME | PATHINFO_EXTENSION | PATHINFO_FILENAME
] )
pathinfo() returns information about
Caution
pathinfo() is locale aware, so for it to parse a path containing multibyte characters correctly, the matching locale must be set using the setlocale() function. Parameters
Return Values
If the
If Changelog
Examples
Example #1 pathinfo() Example
<?php The above example will output: /www/htdocs/inc lib.inc.php php lib.inc
Example #2 pathinfo() example showing difference between null and no extension
<?php The above example will output something similar to: string(0) "" Notice: Undefined index: extension in test.php on line 6 NULL
Example #3 pathinfo() example for a dot-file
<?php The above example will output something similar to: Array ( [dirname] => /some/path [basename] => .test [extension] => test [filename] => ) See Also
|
more
Recently updated
more
Most requested
more
Last requests
|