Esempio n. 1
0
 public static function shutdown_function()
 {
     $lasterror = error_get_last();
     if (in_array($lasterror['type'], array(E_NOTICE, E_STRICT, E_DEPRECATED))) {
         return true;
     }
     $now = date('Y-m-d H:i:s');
     $file = str_replace(ROOTPATH, '', $lasterror['file']);
     var_dump(CNAME, $file);
     exit;
     $errortype = self::parse_errortype($lasterror['type']);
     if (by::redis('backup')->sAdd('errormsg', "{$file}:{$lasterror['line']}")) {
         //报警
     } else {
         //只累加错误次数
     }
     $error = "{$now} {$errortype}: {$lasterror['message']} in {$lasterror['file']} on line {$lasterror['line']}";
     echo $error;
 }
Esempio n. 2
0
File: db.php Progetto: hazardland/db
function in($field, $value)
{
    $object = new by();
    return $object->in($field, $value);
}