Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 68c4798

Browse files
committed
up
1 parent c4e3cc9 commit 68c4798

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/io/Output.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
use inhere\librarys\helpers\ObjectHelper;
66

77
/**
8-
*
8+
* Class Output
9+
* @package inhere\librarys\io
910
*/
1011
class Output
1112
{
@@ -17,8 +18,14 @@ class Output
1718
*/
1819
protected $charset = 'UTF-8';
1920

21+
/**
22+
* @var array
23+
*/
2024
private $headers = [];
2125

26+
/**
27+
* @var array
28+
*/
2229
private $bodys = [];
2330

2431
public function __construct(array $config = [])
@@ -49,6 +56,7 @@ public function send($content = '')
4956
$this->write($content);
5057
}
5158

59+
header($_SERVER['SERVER_PROTOCOL'] . ' 200 OK');
5260
header('Content-type: text/html; charset=' . $this->charset);
5361

5462
$content = implode('', $this->bodys);
@@ -73,6 +81,7 @@ public function send($content = '')
7381
*/
7482
public function json(array $data)
7583
{
84+
header($_SERVER['SERVER_PROTOCOL'] . ' 200 OK');
7685
header('Content-type: application/json; charset='.$this->charset);
7786

7887
echo json_encode($data);

0 commit comments

Comments
 (0)