Browse Source

师傅端小程序-签署协议-shell命令测试

whitefang 1 year ago
parent
commit
d8121d2b15
1 changed files with 1 additions and 5 deletions
  1. 1 5
      app/common/command/AddAgreementPdf.php

+ 1 - 5
app/common/command/AddAgreementPdf.php

@@ -27,10 +27,6 @@ class AddAgreementPdf extends Command
 
     protected function execute(Input $input, Output $output)
     {
-        while (true) {
-            echo date('Y-m-d H:i:s') . PHP_EOL;
-        }
-        return false;
         $mq_config = Config::get('mq');
         // 连接到RabbitMQ服务
         $connection = new AMQPStreamConnection($mq_config['host'], $mq_config['port'], $mq_config['username'], $mq_config['password'], $mq_config['vhost']);
@@ -64,7 +60,7 @@ class AddAgreementPdf extends Command
             mkdir ('./public/'.$path,0777,true);
         }
         $shell_ = 'wkhtmltopdf --page-height 297mm '.$url.' '.'public/'.$path.$pdf;
-        shell_exec($shell_);
+        system($shell_);
         $agreement = MasterWorkerAgree::where('code', $code)->findOrEmpty();
         $agreement->pdf_url = $path.$pdf;
         $agreement->save();