note 86869 modified in function.ftp-rawlist by felipe

From: Date: Fri, 07 Nov 2008 13:39:17 +0000
Subject: note 86869 modified in function.ftp-rawlist by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146279@lists.php.net to get a copy of this message
Some FTP servers only allow you to get list of files under current working directory. So if you always get result as empty array (array(0){ }), try changing the cwd befor get the list: <?php function ftprawlist($connid, $dir) { ftp_chdir($connid, $dir); return ftp_rawlist($connid, "-a"); } ?> --was-- Some FTP servers only allow you to get list of files under current working directory. So if you always get result as empty array (array(0){ }), try changing the cwd befor get the list: function ftprawlist($connid, $dir) { ftp_chdir($connid, $dir); return ftp_rawlist($connid, "-a"); } http://php.net/manual/en/function.ftp-rawlist.php

« previous php.notes (#146279) next »