示例#1
0
 /**
  * 发送响应
  * @param int $response_code HTTP状态码
  * @param array $body_data 内容
  * @param string $error_msg 错误消息
  * @param bool $exit 是否退出
  * @return void
  */
 public function send_response($response_code = 200, $body_data = NULL, $error_msg = '', $exit = TRUE)
 {
     api::send_response($response_code, $body_data, $error_msg, $exit);
 }
示例#2
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
if (IN_PRODUCTION === TRUE) {
    api::send_response($code, NULL, Kohana::lang('core.error_file_line', $file, $line) . "\n" . $message);
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">
<?php 
    include Kohana::find_file('views', 'kohana_errors', FALSE, 'css');
    ?>
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?php 
    echo $error;
    ?>
</title>
<base href="http://php.net/" />
</head>
<body>
<div id="framework_error" style="width:42em;margin:20px auto;">
<h3><?php 
    echo html::specialchars($error);
    ?>
</h3>
<p><?php 
    echo html::specialchars($description);
    ?>