downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SplFileInfo::getPathname> <SplFileInfo::getPath
[edit] Last updated: Fri, 25 May 2012

view this page in

SplFileInfo::getPathInfo

(PHP 5 >= 5.1.2)

SplFileInfo::getPathInfoCrée un objet SplFileInfo pour un chemin

Description

public SplFileInfo SplFileInfo::getPathInfo ([ string $class_name ] )

Crée un objet SplFileInfo pour le dossier qui contient le fichier courant.

Liste de paramètres

class_name

Le nom d'une classe qui dérive de SplFileInfo.

Valeurs de retour

Retourne un objet SplFileInfo pour le dossier qui contient le fichier courant.

Exemples

Exemple #1 Exemple avec SplFileInfo::getPathInfo()

<?php
$info 
= new SplFileInfo('/usr/bin/php');
$parent_info $info->getPathInfo();
var_dump($parent_info->getRealPath());
?>

L'exemple ci-dessus va afficher quelque chose de similaire à :

string(8) "/usr/bin"

Voir aussi



add a note add a note User Contributed Notes SplFileInfo::getPathInfo
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites