From 3772914a500a5948ee6376741e815f5c2baf868f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Awenig=20Mari=C3=A9?= <66798411+awenig@users.noreply.github.com> Date: Mon, 24 Feb 2025 23:36:05 +0100 Subject: [PATCH] Open all files --- scripts/daily.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/daily.php b/scripts/daily.php index d76c47c5..30c6679a 100644 --- a/scripts/daily.php +++ b/scripts/daily.php @@ -3807,7 +3807,7 @@ public function historyPerMpsAverage() } public function debatsInfos(){ - echo "historyPerMpsAverage starting \n"; + echo "debatsInfos starting \n"; // 1. Create table if not exists $this->bdd->query("CREATE TABLE IF NOT EXISTS `debats_infos` ( @@ -3828,7 +3828,16 @@ public function debatsInfos(){ if ($zip->open($file) !== TRUE) { exit("cannot open <$file>\n"); } else { - echo "file opened"; + for ($i = 0; $i < $zip->numFiles; $i++) { + $filename = $zip->getNameIndex($i); + + $xml_string = $zip->getFromName($filename); + + if ($xml_string != false) { + echo "Filename:" . $filename . " \n"; + $xml = simplexml_load_string($xml_string); + } + } }