Przeglądaj źródła

调接口。。。

q 1 rok temu
rodzic
commit
46075f23a6
1 zmienionych plików z 28 dodań i 0 usunięć
  1. 28 0
      webmain/task/openapi/open_repair_fault.php

+ 28 - 0
webmain/task/openapi/open_repair_fault.php

@@ -0,0 +1,28 @@
+<?php
+
+/**
+ *    会议相关
+ *    请求地址如:http://oa.test/api.php?m=openmeet&a=test&openkey=fee5efd3a93ca5c6a85b679cde60faa2
+ */
+class open_repair_faultClassAction extends openapiAction
+{
+
+    public function testAction() {
+        $str = $this->postdata;
+        return json_encode($str);
+    }
+
+    public function upfileAction()
+    {
+        if(!$_FILES)exit('sorry!');
+        $upimg	= c('upfile');
+        $maxsize= (int)$this->get('maxsize', 5);
+        $uptype	= $this->get('uptype', '*');
+        $thumbnail	= $this->get('thumbnail');
+        $upimg->initupfile($uptype, ''.UPDIR.'|'.date('Y-m').'', $maxsize);
+        $upses	= $upimg->up('file');
+        $arr 	= c('down')->uploadback($upses, $thumbnail, false);
+        $this->returnjson($arr);
+    }
+
+}