note 76756 added to function.is-dir

From: Date: Sun, 29 Jul 2007 18:42:53 +0000
Subject: note 76756 added to function.is-dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-129025@lists.php.net to get a copy of this message
I had the same problem as others with not using the complete path to a folder when usin is_dir. It's really important to use complete path. $folder = "../pictures"; $dossier = opendir($folder); while ($Fichier = readdir($dossier)) { if ($Fichier != "." && $Fichier != ".." && $Fichier != "Thumbs.db") { // if(is_dir($Fichier)) { // Do not always works if(is_dir($folder."/".$Fichier)) { // Works always echo "$Fichier"; } // fin if is file } // fin if restriction des fichiers à ne pas afficher } // fin while closedir($dossier); Edouard ---- Server IP: 194.246.101.61 Probable Submitter: 86.211.232.179 ---- Manual Page -- http://www.php.net/manual/en/function.is-dir.php Edit -- https://master.php.net/note/edit/76756 Del: integrated -- https://master.php.net/note/delete/76756/integrated Del: useless -- https://master.php.net/note/delete/76756/useless Del: bad code -- https://master.php.net/note/delete/76756/bad+code Del: spam -- https://master.php.net/note/delete/76756/spam Del: non-english -- https://master.php.net/note/delete/76756/non-english Del: in docs -- https://master.php.net/note/delete/76756/in+docs Del: other reasons-- https://master.php.net/note/delete/76756 Reject -- https://master.php.net/note/reject/76756 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129025) next »