PHP funkce dirname()

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

AI konzultace & implementace

Pomohu vám zavést AI do vašeho projektu– od analýzy a návrhu řešení až po nasazení do produkce. Ušetřete čas, zjednodušte procesy a získejte konkurenční výhodu.

Domluvit konzultaci
Konzultant: Jan Barášek
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

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.