コード例 #1
0
 static function ViewErrors()
 {
     $bindlog = ctrl_options::GetSystemOption('bind_log');
     $logerror = array();
     $logwarning = array();
     $getlog = array();
     if (file_exists($bindlog)) {
         $handle = @fopen($bindlog, "r");
         $getlog = array();
         if ($handle) {
             while (!feof($handle)) {
                 $buffer = fgets($handle, 4096);
                 $getlog[] = $buffer;
                 if (strstr($buffer, 'error:') || strstr($buffer, 'error ')) {
                     $logerror[] = $buffer;
                 }
                 if (strstr($buffer, 'warning:') || strstr($buffer, 'warning ')) {
                     $logwarning[] = $buffer;
                 }
             }
             fclose($handle);
             if (!fs_director::CheckForEmptyValue($logerror)) {
                 self::$logerror = $logerror;
             }
             if (!fs_director::CheckForEmptyValue($logwarning)) {
                 self::$logwarning = $logwarning;
             }
             if (!fs_director::CheckForEmptyValue($getlog)) {
                 self::$getlog = $getlog;
             }
         }
     }
 }