Oppdaterte filsti

This commit is contained in:
Trygve 2023-11-27 14:05:58 +01:00
parent e6d44dca6d
commit fdfa3b2c50
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ header('Access-Control-Expose-Headers: X-Events');
include 'lastSavedChange.php'; include 'lastSavedChange.php';
$resultFile = "resultater/Resultater.xml"; $resultFile = "resultater/results.xml";
//load variable from last check //load variable from last check
$lastChange = filemtime($resultFile); $lastChange = filemtime($resultFile);
$time = date('r'); $time = date('r');
@ -31,7 +31,7 @@ if ($lastSavedChange<$lastChange){
$var_str = var_export($lastChange, true); $var_str = var_export($lastChange, true);
$var = "<?php\n\n\$lastSavedChange = $var_str;\n\n?>"; $var = "<?php\n\n\$lastSavedChange = $var_str;\n\n?>";
file_put_contents('lastSavedChange.php', $var, LOCK_EX); file_put_contents('lastSavedChange.php', $var, LOCK_EX);
$objXmlDocument = simplexml_load_file("resultater/Resultater.xml"); $objXmlDocument = simplexml_load_file("resultater/results.xml");
//xml to json //xml to json
if ($objXmlDocument === FALSE) { if ($objXmlDocument === FALSE) {

View File

@ -1,6 +1,6 @@
<?php <?php
libxml_use_internal_errors(TRUE); libxml_use_internal_errors(TRUE);
$objXmlDocument = simplexml_load_file("resultater/Resultater.xml"); $objXmlDocument = simplexml_load_file("resultater/results.xml");
if ($objXmlDocument === FALSE) { if ($objXmlDocument === FALSE) {
foreach(libxml_get_errors() as $error) { foreach(libxml_get_errors() as $error) {