Ejemplo n.º 1
0
 function save()
 {
     arsort($this->scores);
     $path = ConfPath::scoreUser($this->target);
     $file = fopen($path, "w");
     $lsstText = '';
     foreach ($this->scores as $tid => $score) {
         $info = $this->infos[$tid];
         if ($lastText == $info['text']) {
             continue;
         }
         $lastText = $info['text'];
         $list = array();
         foreach ($info as $key => $value) {
             $list[] = $key . "=" . $value;
         }
         fprintf($file, "score=%f,%s\n", $score, implode(",", $list));
     }
     fclose($file);
 }