lvhao пре 13 часа
родитељ
комит
c3776b3353
1 измењених фајлова са 12 додато и 1 уклоњено
  1. 12 1
      core/CoreApp/controllers/Lyerpapi/v1/Yyys.php

+ 12 - 1
core/CoreApp/controllers/Lyerpapi/v1/Yyys.php

@@ -6,10 +6,21 @@ class Yyys extends Lyapi_Controller{
     public function __construct() {
         // 这里不执行登录校验,只加载缓存驱动
         parent::__construct(); // 暂时注释,或者使用一个新的不校验的基类
+        $this->load->_model("Model_ysrecords","ysrecords");
     }
 
     public function lyysmsghz() {
         $ip = $this->input->ip_address();
-        echo "hello word-".$ip;
+        if($ip != '59.110.247.93'){
+            exit('No direct script access allowed');
+        }
+        $json_str = $this->input->raw_input_stream;
+        $this->db->insert("ysnorecords",[
+            'ys_no'=>date("YmdHis"),
+            'recept_cont'=>$json_str,
+            'addtime'=>time(),
+        ]);
+        echo "SUCCESS";
+        exit;
     }
 }