Esempio n. 1
0
 public function uploadIndexPic()
 {
     if (!$_FILES) {
         $this->ReportError('请选择文件');
     }
     if ($this->settings['App_publishsys']) {
         $postFields = array('a' => 'uploadIndexPic', 'file' => $_FILES, 'request' => 'admin/magic_update.php');
         $objHttp = new Http($this->settings['App_publishsys']['host'], $this->settings['App_publishsys']['dir']);
         $hgDataReturn = $objHttp->http($postFields);
         echo json_encode($hgDataReturn);
     } else {
         $this->ReportError('此系统未安装');
     }
 }
Esempio n. 2
0
 public static function http_server()
 {
     self::$http = new swoole_http_server(self::$host, self::$port, SWOOLE_BASE);
 }