示例#1
0
 public function send()
 {
     $backuper = tbackuper::i();
     $filename = $backuper->createbackup();
     $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
     $ini = parse_ini_file($dir . 'about.ini');
     tmailer::SendAttachmentToAdmin("[backup] {$filename}", $ini['body'], basename($filename), file_get_contents($filename));
 }
示例#2
0
 public function sendexceptions()
 {
     $filename = litepublisher::$paths->data . 'logs' . DIRECTORY_SEPARATOR . 'exceptionsmail.log';
     if (!file_exists($filename)) {
         return;
     }
     $time = @filectime($filename);
     if ($time === false || $time + 3600 > time()) {
         return;
     }
     $s = file_get_contents($filename);
     tfilestorage::delete($filename);
     tmailer::SendAttachmentToAdmin('[error] ' . litepublisher::$site->name, 'See attachment', 'errors.txt', $s);
     sleep(2);
 }