Einzelnen Beitrag anzeigen
  #47  
Alt 01.12.2004, 13:02:48
c4 c4 ist offline
SELFPHP Guru
 
Registriert seit: Jul 2002
Ort: Oberursel
Alter: 54
Beiträge: 4.748
Warum gibst Du mir dann das alte Skript, welches Probleme verursacht hatte??

Ich passe also mal das alte neue Skript an:
PHP-Code:
<head></head>
<body>
<?php
$f
=file('./lic.txt');
$j=0;

for (
$i=0$i<count($f); $i++) {
    if (
strstr($f[$i], 'Total of')) {
        if (
preg_match_all('/Users of (.*):.*Total of (d*) licenses? issued;  Total of (d*) licenses? in use/isU'$f[$i], $temp)>0) {
            
$j++;
            
$data[$j]=array('program' => $temp[1][0],
                            
'issued' => $temp[2][0],
                            
'used' => $temp[3][0]);
            echo 
"{$data[$j]['program']} {$data[$j]['issued']} {$data[$j]['used']}<br>n";
        }
    }
}

unset(
$f);
$f=file('./datei.txt');
for (
$i=0$i<count($f); $i++) {
    
$temp=explode(' 'trim($f[$i]));
    echo 
$temp[0].' '.$temp[count($temp)-3].' '.$temp[count($temp)-2].' '.$temp[count($temp)-1]."<br>n";
}
?>
</body>
</html><?php exit; ?>
Wo war da jetzt das Problem? Erst die Eine Datei auslesen und dann die andere. Fertig.
__________________
sic!
--> http://dbCF.de/
Mit Zitat antworten