English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Référence Manuel
La fonction dirname() peut retourner le nom du répertoire à partir d'un chemin.
string dirname ( string path )
<?php echo dirname("C:/PhpProject/index.php") . "\n"; echo dirname("/PhpProject/index.php"); ?>
Résultat de la sortie
C:/PhpProject /PhpProject