note 38805 added to function.ftp-nlist
| From: | king_killa at juggalos4life dot com | Date: | Wed, 07 Jan 2004 16:03:49 +0000 |
| Subject: | note 38805 added to function.ftp-nlist | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63082@lists.php.net to get a copy of this message | ||
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";
}
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.ftp-nlist.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38805
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38805&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38805&report=yes
Search -- http://master.php.net/manage/user-notes.php