public function errorAction() { $exp = $this->getRequest()->getException(); $code = $exp->getCode(); if ($code === YAF_ERR_NOTFOUND_CONTROLLER || $code === YAF_ERR_NOTFOUND_ACTION) { Core_Log::warning($exp->getMessage()); header('HTTP/1.1 403 Forbidden'); } else { Core_Log::fatal($exp->getMessage()); header('HTTP/1.1 500 Internal Server Error'); } }
private function __uploadFile($filePath) { $paf = Arch_Paf::instance('image'); fwrite(fopen('d:/upload_1.log', 'w'), $filePath); $param = array('module' => 'image', 'file' => file_get_contents($filePath), 'size' => array(100)); $res = $paf->call('publish', $param); if ($res['flag'] == 0) { return $res['data']['100']; } fwrite(fopen('d:/upload_2.log', 'w'), serialize($res)); Core_Log::fatal('avatar upload fail', $res); return false; }
public function __construct($msg, $argv = null) { parent::__construct($msg, $argv); Core_Log::fatal($msg, $argv); }