PHP Manual

PHP funkce dirname()

2019-09-11T08:04:03.000Z

Obsah článku

Dostupnost ve verzích: PHP 4.0

Returns directory name component of path

Parametry

Parametr Datový typ Výchozí hodnota Poznámka
$path string není A path.
$levels int 1 The number of parent directories to go up. This must be an integer greater than 0.

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

Oficiální dokumentace funkce dirname

Jan Barášek   Více o autorovi

Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.

Rád vám pomůžu:

Související články

1.
205.

Potřebujete poradit s PHP?

Nabízím trénink vývojářů, konzultace, školení a analýzu návrhových vzorů. Osobně v Praze nebo online.

Napište mi, pokud si nevíte rady.

Lektor: Jan Barášek

V jiných jazycích

Status:
All systems normal.
2025