-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.php
38 lines (35 loc) · 920 Bytes
/
error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
require_once('./common.php');
class ErrorLog extends Common {
public function index() {
$this->check();
$errorLog = isset($_POST['error_log']) ? $_POST['error_log'] : '';
if(!$errorLog) {
return Response::show(401, '日志为空');
}
$sql = "insert into
error_log(
`app_id`,
`did`,
`version_id`,
`version_mini`,
`error_log`,
`create_time`)
values(
".$this->params['app_id'].",
'".$this->params['did']."',
".$this->params['version_id'].",
".$this->params['version_mini'].",
'".$errorLog."',
".time().
)";
$connect = NewData::getInstance()->connect();
if(mysql_query($sql, $connect)) {
return Response::show(200, '错误信息插入成功');
} else {
return Response::show(400, '错误信息插入失败');
}
}
}
$error = new ErrorLog();
$error->index();