if (isset($_GET['displayFolderAndFiles'])) {
function listIt ($path) {
$items = scandir($path);
foreach ($items as $item) {
// Ignore the . and .. folders
if ($item != "." AND $item != "..") {
if (is_file($path . $item)) {
// this is the file
}
else {
// this is the directory
// do the list it again!
echo "[*]" . $item . "";
echo "
- ";
listIt($path . $item . "/");
//echo("");
echo "
}
$id++;
}
}
}
listIt("./My Files/");
}
< /code>
С этим кодом мне трудно манипулировать представлением дерева. Я использую Ajax, чтобы получить результат. Я также хочу загрузить страницу, как только я выполняю некоторые запросы в своем приложении, не обновляя страницу. System (filerun)
Подробнее здесь: https://stackoverflow.com/questions/554 ... g-ajax-php
Мобильная версия