PHP funkce dirname()
📅 06. 07. 2020Dostupnost ve verzích: PHP 4.0
Returns directory name component of path
Parametry
Parametr | Datový typ | Výchozí hodnota | Poznámka |
---|---|---|---|
$path | string | A path. | |
$levels | int | 1 | The number of parent directories to go up. This must be an integer greater than 0. |
Návratové hodnoty
string
the name of the directory. If there are no slashes in path, a dot ('.') is returned, indicating the current directory. Otherwise, the returned string is path with any trailing /component removed.
Další zdroje
Jan Barášek Více o autorovi
Autor článku podniká jako fullstack senior developer v Praze. Spravuje 300 různě velkých webových projektů, fungujících dodnes. Během spolupráce nabral hluboké zkušenosti, které na tomto webu předává dál.
Rád vám pomůžu:
Kontakt Konzultace a služby Nabídka spolupráce