pathinfo
Renvoie les informations du chemin du fichier
pathinfo()
renvoie les informations sur le chemin de fichier en tant que tableau.
<? Php print_r ( pathinfo ( "/testweb/test.txt" ) ) ; ?>
Sortir:
Tableau ( [dirname] => / testweb [Basename] => test.txt [Extension] => txt )
<? Php print_r ( pathinfo ( "/testweb/test.txt" , pathinfo_basename ) ) ; ?>
Sortir:
test.txt
Pathinfo ( chemin , options )
paramètre | décrire |
---|---|
chemin | Requis. Spécifiez le chemin à vérifier. |
process_sections |
Facultatif. Spécifie l'élément de tableau à retourner. La valeur par défaut est tout. Valeurs possibles:
|
pathinfo()
renvoie un tableau associatif contenant des informations de chemin .
Comprend les éléments du tableau suivant: