コード例 #1
0
ファイル: skin.php プロジェクト: floatla/ModLayer-Docs
 public static function DisplayInternalError($message, $backTrace, $fileName, $lineNumber, $htmlMode = true)
 {
     $xsl = $htmlMode ? 'error.xsl' : 'error.xsl';
     libxml_clear_errors();
     $xslpath = PathManager::GetApplicationPath() . '/modlayer/error/' . $xsl;
     $thisTemplate = new Templates();
     $thisTemplate->setErrorsheet($xslpath);
     $thisTemplate->ShowingError = true;
     $backTrace['get_params'] = $_GET;
     $backTrace['post_params'] = $_POST;
     $backTrace['tag'] = 'resource';
     $request = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "No url request";
     if (strpos($request, '?')) {
         $request = substr($request, 0, strpos($request, '?'));
     }
     $thisTemplate->setparam("page_url", $request);
     $thisTemplate->setparam('message', $message);
     // Util::debug($backTrace);
     // die;
     $thisTemplate->setcontent($_SERVER, null, 'server');
     $thisTemplate->setcontent($backTrace, null, 'backtrace');
     $thisTemplate->setconfig($thisTemplate->client->GetDetails(), null, 'client');
     $thisTemplate->setparam('referer', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '');
     $thisTemplate->setparam("error", '500-100');
     return $thisTemplate->returnDisplay();
 }