note 69688 added to function.ftp-rawlist
| From: | kerbpm at osu1 dot php dot net | Date: | Fri, 15 Sep 2006 09:31:09 +0000 |
| Subject: | note 69688 added to function.ftp-rawlist | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-117215@lists.php.net to get a copy of this message | ||
Your code is ok, just replace $i = 0 instead of 1
Thank you
<?php
function parse_rawlist( $array ) {
for ( $i = 1; $i < count($array); $i++ ) {
$current = $array[$i];
$structure[$i]['perms'] = substr($current, 0, 10);
$structure[$i]['number'] = trim(substr($current, 11, 3));
$structure[$i]['owner'] = trim(substr($current, 15, 8));
$structure[$i]['group'] = trim(substr($current, 24, 8));
$structure[$i]['size'] = trim(substr($current, 33, 8));
$structure[$i]['month'] = trim(substr($current, 42, 3));
$structure[$i]['day'] = trim(substr($current, 46, 2));
$structure[$i]['time'] = substr($current, 49, 5);
$structure[$i]['name'] = substr($current, 55, strlen($current) - 55);
}
return $structure;
}
?>
----
Server IP: 217.174.203.10
Probable Submitter: 82.233.28.23
----
Manual Page -- http://www.php.net/manual/en/function.ftp-rawlist.php
Edit -- https://master.php.net/note/edit/69688
Del: integrated -- https://master.php.net/note/delete/69688/integrated
Del: useless -- https://master.php.net/note/delete/69688/useless
Del: bad code -- https://master.php.net/note/delete/69688/bad+code
Del: spam -- https://master.php.net/note/delete/69688/spam
Del: non-english -- https://master.php.net/note/delete/69688/non-english
Del: in docs -- https://master.php.net/note/delete/69688/in+docs
Del: other reasons-- https://master.php.net/note/delete/69688
Reject -- https://master.php.net/note/reject/69688
Search -- https://master.php.net/manage/user-notes.php