RE: [PHP-NOTES] note 24374 added to function.ftp-rawlist
| From: | Maxim Maletsky | Date: | Wed, 14 Aug 2002 17:09:15 +0000 |
| Subject: | RE: [PHP-NOTES] note 24374 added to function.ftp-rawlist | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-35012@lists.php.net to get a copy of this message | ||
Could you, please, try finding if this bug was already reported on
bugs.php.net? If not, submit it then tight there.
I will remove your note for now.
Thanks,
Maxim Maletsky
maxim@php.net
> -----Original Message-----
> From: fbeyer@ [mailto:nospam@php.net]
> Sent: Wednesday, August 14, 2002 5:57 PM
> To: php-notes@lists.php.net
> Subject: [PHP-NOTES] note 24374 added to function.ftp-rawlist
>
> I discovered a strange bug with ftp_rawlist(). I don't know if it is
os
> specific - I'm using Windows XP with PHP 4.2.2 and Apache 1.3.20 (PHP
> apache module).
>
> If i try to get a list for a dir name containing spaces, eg. 'my dir',
it
> returnes an empty array:
>
> Dir structure:
> /my dir
> /otherdir
>
> Example script:
>
> <?php
> echo count(ftp_nlist($ftp, 'my dir'));
> // outputs 3 ('.', '..', 'otherdir')
>
> echo count(ftp_rawlist($ftp, 'my dir'));
> // output 0
> ?>
>
> The solution is to first ftp_chdir() to the directory and then
requesting
> the list for '.':
>
> <?php
> ftp_chdir($ftp, 'my dir');
> echo count(ftp_rawlist($ftp, '.'));
> // outputs 3
> ?>
>
> HTH - Took me hours to isolate this... :-(
> --
> http://www.php.net/manual/en/function.ftp-rawlist.php
> http://master.php.net/manage/user-notes.php?action=edit+24374
> http://master.php.net/manage/user-notes.php?action=delete+24374
> http://master.php.net/manage/user-notes.php?action=reject+24374
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php