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

search for in the

SplFileInfo::isLink> <SplFileInfo::isExecutable
Last updated: Fri, 14 Aug 2009

view this page in

SplFileInfo::isFile

(PHP 5 >= 5.1.2)

SplFileInfo::isFileIndique si un fichier est un véritable fichier

Description

public bool SplFileInfo::isFile ( void )

Indique si un fichier existe et est un véritable fichier.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne TRUE si le fichier existe et qu'il est un véritable fichier (et non pas un lien) et FALSE sinon.

Exemples

Exemple #1 Exemple avec SplFileInfo::isFile()

<?php
$info 
= new SplFileInfo(__FILE__);
var_dump($info->isFile());

$info = new SplFileInfo(dirname(__FILE__));
var_dump($info->isFile());
?>

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

bool(true)
bool(false)



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

SplFileInfo::isLink> <SplFileInfo::isExecutable
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites