diff --git a/outputhtml.php b/outputhtml.php index c0a35db..b2234ba 100644 --- a/outputhtml.php +++ b/outputhtml.php @@ -100,11 +100,11 @@ EOT; as $key=>$val) { $files = $dom->getElementsByTagName ($key); - for ($i = 0 ; $i < $files->length ; $i++) + foreach ($files as $id=>$file) { - if ($files[$i]->hasAttribute ($val) === false) + if ($file->hasAttribute ($val) === false) continue; - $src = $files[$i]->getAttribute ($val); + $src = $file->getAttribute ($val); if ($src === "") continue; if (substr ($src, 0, 7) === "http://" || @@ -121,12 +121,10 @@ EOT; $srcHash = filemtime ($srcFile); else $srcHash = time(); - $dom->getElementsByTagName ($key)[$i]->setAttribute ($val, - "$src?$srcHash"); + $file->setAttribute ($val, "$src?$srcHash"); } } - echo $dom->saveHTML();exit; - echo $resView; + echo $dom->saveHTML(); if (!defined ("PHPUNIT")) exit; }