Не хватает оперативной памяти для открытия файла
Есть код
<?php
set_time_limit(0);
function listFile($name)
{
$list = glob($name . '.*');
foreach($list as $filename)
{
echo('<div>' . $filename . '</dev><br/>');
#echo('<dev><pre>' . file_get_contents($filename) . '</pre></dev><br/>');
echo('<br/>');
}
unset($list);
$list = glob($name);
foreach($list as $path)
{
listFile($path . '/*');
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Menu</title>
<meta charset="UTF-8">
</head>
<body>
<?php listFile('*'); ?>
</body>
</html>
Но не хватает 8 GB memory для открытия данных в файлах. Файлов много Вот список:
etc/ca-certificates.conf
etc/conf.d
etc/init.d
etc/logrotate.d
etc/modprobe.d
etc/modules-load.d
etc/profile.d
etc/resolv.conf
etc/sysctl.conf
etc/sysctl.d
etc/udhcpd.conf
etc/apk/protected_paths.d
etc../Playground/[email protected]
etc../Playground/[email protected]
etc../Playground/[email protected]
etc../Playground/-certificates.list
etc/ca-certificates/update.d
etc/modprobe.d/aliases.conf
etc/modprobe.d/blacklist.conf
etc/modprobe.d/i386.conf
etc/modprobe.d/kms.conf
etc/network/if-down.d
etc/network/if-post-down.d
etc/network/if-post-up.d
etc/network/if-pre-down.d
etc/network/if-pre-up.d
etc/network/if-up.d
etc/ssl/cert.pem
etc/ssl/ct_log_list.cnf
etc/ssl/ct_log_list.cnf.dist
etc/ssl/openssl.cnf
etc/ssl/openssl.cnf.dist
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
etc../Playground/
Может есть у кого предложения для открытия всех файлов. А также возможно есть более лучший способ вывода файлов. glob не плох но наверное есть вореанты лучше!