note 21983 added to function.ftp-rawlist
| From: | murasame at danzers dot org | Date: | Sun, 02 Jun 2002 22:11:31 +0000 |
| Subject: | note 21983 added to function.ftp-rawlist | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31354@lists.php.net to get a copy of this message | ||
I tweaked the regexp above and used it like this in a for-loop:
...
ereg("([-d])([rwxst-]{9}).* ([0-9]*) ([a-zA-Z]+[0-9: ]* [0-9]{2}:?[0-9]{2}) (.+)",
$raw[$i], $regs)
$out[] = array("is_dir" =>
($regs[1] == "d") ? true : false,
"mod" => $regs[2],
"size" => $regs[3],
"time" => $regs[4],
"name" => $regs[5],
"raw" => $regs[0]);
...
the previous version couldn't handle old dates which are in format 'M d Y' instead of
'M d H:i' correctly
--
http://www.php.net/manual/en/function.ftp-rawlist.php
http://master.php.net/manage/user-notes.php?action=edit+21983
http://master.php.net/manage/user-notes.php?action=delete+21983
http://master.php.net/manage/user-notes.php?action=reject+21983