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

search for in the

SplFileInfo::getPathInfo> <SplFileInfo::getOwner
[edit] Last updated: Fri, 25 May 2012

view this page in

SplFileInfo::getPath

(PHP 5 >= 5.1.2)

SplFileInfo::getPathLe le chemin sans le nom de fichier

Description

public string SplFileInfo::getPath ( void )

Retourne le nom du chemin sans le nom de fichier, ou un slash final.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne le chemin du fichier.

Exemples

Exemple #1 Exemple avec SplFileInfo::getPath()

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


$info = new SplFileInfo('/usr/');
var_dump($info->getPath());?>

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

string(8) "/usr/bin"
string(4) "/usr"

Voir aussi



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

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