note 15518 added to function.is-file

From: Date: Sat, 15 Sep 2001 02:24:23 +0000
Subject: note 15518 added to function.is-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-18032@lists.php.net to get a copy of this message
Pour tester l'existence d'un fichier (distant ou pas)(non testé sur serveur même mais au moins pour distant oui) sans avoir de message d'erreur quand le fichier n'existe pas: $temp = error_reporting(E_ALL & ~(E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE)); $file = fopen ("$homepage", "r"); if (!$file) { echo "Cette url est cassée, verifiez-en l'orthographe je vous prie"; } error_reporting($temp); http://www.php.net/manual/fr/function.is-file.php

« previous php.notes (#18032) next »