刘桂岩 3 лет назад
Родитель
Сommit
49f3d4b657
2 измененных файлов с 15 добавлено и 16 удалено
  1. 0 1
      app/controller/DiAn.php
  2. 15 15
      app/controller/Index.php

+ 0 - 1
app/controller/DiAn.php

@@ -21,7 +21,6 @@ class DiAn extends BaseController
 
     public static function getDiAnData($data)
     {
-        return 1;
         ini_set('default_socket_timeout', 600);
         $xml = $data;
         $obj = simplexml_load_string($xml,"SimpleXMLElement", LIBXML_NOCDATA);

+ 15 - 15
app/controller/Index.php

@@ -20,22 +20,22 @@ class Index extends BaseController
     }
     public function getReport()
     {
-        ini_set('default_socket_timeout', 600);
         libxml_disable_entity_loader(false);
-        $opts = array(
-            'ssl'   => array(
-                'verify_peer'          => false
-            ),
-            'https' => array(
-                'curl_verify_ssl_peer'  => false,
-                'curl_verify_ssl_host'  => false
-            )
-        );
-        $streamContext = stream_context_create($opts);
-        $client = new \SoapClient("http://112.103.134.89:10020/server.php?wsdl",
-            array(
-                'stream_context'    => $streamContext
-            ));
+//        $opts = array(
+//            'ssl'   => array(
+//                'verify_peer'          => false
+//            ),
+//            'https' => array(
+//                'curl_verify_ssl_peer'  => false,
+//                'curl_verify_ssl_host'  => false
+//            )
+//        );
+//        $streamContext = stream_context_create($opts);
+//        $client = new \SoapClient("http://112.103.134.89:10020/server.php?wsdl",
+//            array(
+//                'stream_context'    => $streamContext
+//            ));
+        $client = new \SoapClient("http://112.103.134.89:10020/server.php?wsdl")
         $data = [
             'Barcode'=>'12203310010001'
         ];   //请求参数