czesc jestem juz zmeczony
mam taki kod
//path to directory to scan
$directory = __DIR__ . '/files/';
//get all files
$files = glob($directory . "*.*");
foreach ($files as $file) {
$path_parts = pathinfo($file);
$content = file_get_contents($path_parts['dirname'] . "/" . $path_parts['basename']);
global $filess;
$filess = $path_parts['basename'] . '" : ' . '"' . $content;
}
echo 'var files = {"' . $filess . '"}';
jak mam zrobic zeby string dodawal sie przy każdym pliku(nazwa, content)
.__.