note 38805 deleted from function.ftp-nlist by didou

From: Date: Sun, 16 Jan 2005 05:41:56 +0000
Subject: note 38805 deleted from function.ftp-nlist by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83381@lists.php.net to get a copy of this message
Note Submitter: king_killa at juggalos4life dot com ---- If you want to see if something is a file or directory, use ftp_res() if you use it on a foler, it will return "-1" but if you use it on a file, it will always be atleast "0" <? foreach($contents as $item) { $res = ftp_res($connection, $item); if("$res" == "-1") { echo "DIR: $item"; } else { echo "FILE: $item"; } } ?>

« previous php.notes (#83381) next »