shish 2 yıl önce
ebeveyn
işleme
2cdb16c4b3
1 değiştirilmiş dosya ile 15 ekleme ve 20 silme
  1. 15 20
      app-ghs/controllers/TestController.php

+ 15 - 20
app-ghs/controllers/TestController.php

@@ -27,38 +27,33 @@ use common\components\wxUtil;
 use common\components\payUtil;
 use Yii;
 use common\components\util;
-use phpwkhtmltox\PDF\Converter as PDFConverter;
-use phpwkhtmltox\PDF\Object as PDFObject;
-use phpwkhtmltox\Image\Converter;
+
+use wkhtmltox\Image\Converter;
 
 
 class TestController extends BaseController
 {
 
-    public $guestAccess = ['clear-query', 'ip', 'debt', 'apply', 'clear', 'ls-trade-query', 'refund-query', 'inform', 'notice', 'order-query', 'add-order', 'index', 'get', 'trade-query', 'query', 'balance-query', 'refund'];
+    public $guestAccess = ['in', 'clear-query', 'ip', 'html', 'debt', 'apply', 'clear', 'ls-trade-query', 'refund-query', 'inform', 'notice', 'order-query', 'add-order', 'index', 'get', 'trade-query', 'query', 'balance-query', 'refund'];
+
+    public function actionIn()
+    {
+        phpinfo();
+    }
 
     public function actionIp()
     {
-        error_reporting(-1);
-        //phpinfo();
-//        $ip = $_SERVER['SERVER_ADDR'] ?? '';
-//        echo $ip;
-
-//        $converter = new PDFConverter([
-//            "out" => "test.pdf"
-//        ]);
-//        $converter->add(new PDFObject(
-//            file_get_contents("http://www.google.co.uk")));
-//        $converter->convert();
-
-        $c = new Converter(null, [
+        $ip = $_SERVER['SERVER_ADDR'] ?? '';
+        echo $ip;
+    }
+
+    public function actionHtml()
+    {
+        new Converter(null, [
             "fmt" => "png",
             "in" => "https://www.baidu.com",
             "out" => "test.png"
         ]);
-        var_dump($c);
-        //$c->convert();
-
     }
 
     //欠款的查询与跟踪 ssh 20240103