Skip to content

Commit f2193b9

Browse files
authored
Merge pull request #961 from datanfr/comptes-rendus
Open all files
2 parents 92b3cb9 + 3772914 commit f2193b9

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

scripts/daily.php

+11-2
Original file line numberDiff line numberDiff line change
@@ -3807,7 +3807,7 @@ public function historyPerMpsAverage()
38073807
}
38083808

38093809
public function debatsInfos(){
3810-
echo "historyPerMpsAverage starting \n";
3810+
echo "debatsInfos starting \n";
38113811

38123812
// 1. Create table if not exists
38133813
$this->bdd->query("CREATE TABLE IF NOT EXISTS `debats_infos` (
@@ -3828,7 +3828,16 @@ public function debatsInfos(){
38283828
if ($zip->open($file) !== TRUE) {
38293829
exit("cannot open <$file>\n");
38303830
} else {
3831-
echo "file opened";
3831+
for ($i = 0; $i < $zip->numFiles; $i++) {
3832+
$filename = $zip->getNameIndex($i);
3833+
3834+
$xml_string = $zip->getFromName($filename);
3835+
3836+
if ($xml_string != false) {
3837+
echo "Filename:" . $filename . " \n";
3838+
$xml = simplexml_load_string($xml_string);
3839+
}
3840+
}
38323841
}
38333842

38343843

0 commit comments

Comments
 (0)