может я чего недопонял в постановке, но это сущая фигня. 26 строк вместе с выводом
<?php
function fillEntries($dir, &$entries)
{
$d = dir($dir);
$subEntries = array();
while (($entry = $d->read()) !== false)
{
if ($entry{0} != '.')
{
if (is_file($dir.'/'.$entry))
$subEntries[] = $entry;
else
fillEntries($dir.'/'.$entry, $entries);
}
}
$d->close();
$entries[$dir] =& $subEntries;
}
$entries = array();
fillEntries('data', $entries);
echo "<pre>\n";
print_r($entries);
echo "</pre>\n";
натравил на phpbb
Array
(
[phpBB3/adm/images] => Array
(
[0] => icon_sync_disabled.gif
[1] => phpbb_logo.gif
[2] => bg_hash1.gif
[3] => bg_hash2.gif
[4] => bg_hash3.gif
[5] => icon_down.gif
[6] => file_modified.gif
[7] => bg_hash4.gif
[8] => gradient2b.gif
[9] => file_up_to_date.gif
[10] => bg_button.gif
[11] => icon_folder.gif
[12] => icon_sync.gif
[13] => arrow_right.gif
[14] => file_new.gif
[15] => progress_bar.gif
[16] => icon_edit.gif
[17] => no_image.png
[18] => arrow_up.gif
[19] => cellpic3.gif
[20] => file_conflict.gif
[21] => icon_folder_link.gif
[22] => icon_delete_disabled.gif
[23] => icon_down_disabled.gif
[24] => icon_trace.gif
[25] => corners_left2.gif
[26] => corners_right.gif
[27] => file_new_conflict.gif
[28] => icon_delete.gif
[29] => bg_header.jpg
[30] => spacer.gif
[31] => arrow_down.gif
[32] => toggle.gif
[33] => bg_tabs1.gif
[34] => bg_tabs_alt1.gif
[35] => bg_tabs2.gif
[36] => bg_tabs_alt2.gif
[37] => icon_up_disabled.gif
[38] => icon_edit_disabled.gif
[39] => corners_left.gif
[40] => corners_right2.gif
[41] => icon_folder_lock.gif
[42] => icon_up.gif
[43] => innerbox_bg.gif
[44] => icon_subfolder.gif
[45] => file_not_modified.gif
[46] => bg_header.gif
[47] => arrow_left.gif
[48] => no_avatar.gif
)
[phpBB3/adm/style] => Array
(
[0] => overall_header.html
[1] => install_error.html
[2] => permissions.js
[3] => confirm_body_prune.html
[4] => acp_profile.html
[5] => acp_users.html
[6] => acp_logs.html
[7] => acp_database.html
[8] => install_install.html
[9] => acp_prune_users.html
[10] => acp_attachments.html
[11] => install_update_diff.html
[12] => acp_update.html
[13] => acp_main.html
[14] => acp_jabber.html
[15] => acp_users_overview.html
[16] => acp_board.html
[17] => custom_profile_fields.html
[18] => acp_words.html
[19] => acp_ban.html
[20] => install_footer.html
[21] => acp_captcha.html
[22] => progress_bar.html
[23] => acp_search.html
[24] => acp_users_feedback.html
[25] => acp_icons.html
[26] => acp_ranks.html
[27] => acp_groups.html
[28] => acp_users_profile.html
[29] => simple_footer.html
[30] => permission_roles_mask.html
[31] => install_main.html
[32] => acp_email.html
[33] => colour_swatch.html
[34] => admin.css
[35] => install_header.html
[36] => acp_permission_roles.html
[37] => acp_users_prefs.html
[38] => acp_bbcodes.html
[39] => acp_inactive.html
[40] => acp_bots.html
[41] => viewsource.html
[42] => acp_reasons.html
[43] => editor.js
[44] => acp_forums.html
[45] => simple_header.html
[46] => acp_disallow.html
[47] => permission_mask.html
[48] => acp_users_signature.html
[49] => acp_language.html
[50] => acp_styles.html
[51] => overall_footer.html
[52] => acp_users_avatar.html
[53] => acp_php_info.html
[54] => acp_modules.html
[55] => acp_permissions.html
[56] => message_body.html
[57] => tooltip.js
[58] => simple_body.html
[59] => permission_trace.html
[60] => install_convert.html
[61] => acp_prune_forums.html
[62] => install_update.html
[63] => confirm_body.html
)
…
[phpBB3/styles/prosilver] => Array
(
[0] => style.cfg
)
[phpBB3/styles] => Array
(
)
[phpBB3] => Array
(
[0] => config.php
[1] => common.php
[2] => cron.php
[3] => faq.php
[4] => index.php
[5] => mcp.php
[6] => memberlist.php
[7] => posting.php
[8] => report.php
[9] => search.php
[10] => style.php
[11] => ucp.php
[12] => viewforum.php
[13] => viewonline.php
[14] => viewtopic.php
)
)
ιιlllιlllι унц-унц