Kaynağa Gözat

增加退出,解决header输出问题

shish 2 ay önce
ebeveyn
işleme
3e6dfef77e

+ 3 - 2
app-ghs/controllers/NoticeController.php

@@ -63,7 +63,7 @@ class NoticeController extends PublicController
             if ($capitalType == dict::getDict('capitalType', 'xhRenew', 'id')) {
                 noticeUtil::push("有客户付款成功:" . $orderSn . ' ' . $totalFee, '15280215347');
             }
-
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -157,6 +157,7 @@ class NoticeController extends PublicController
             }
             //请不要修改
             echo "success";
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -257,7 +258,7 @@ class NoticeController extends PublicController
             }
             $transaction->commit();
             echo "success";
-            util::end();
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());

+ 1 - 1
app-ghs/web/index.php

@@ -20,7 +20,7 @@ function dd($out)
 {
 	echo '<pre>';
 	var_dump($out);
-	Yii::$app->end();
+	exit();
 }
 
 $application = new yii\web\Application($config);

+ 7 - 3
app-hd/controllers/NoticeController.php

@@ -256,7 +256,7 @@ class NoticeController extends PublicController
                     }
                 }
             }
-
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -506,7 +506,7 @@ class NoticeController extends PublicController
                     }
                 }
             }
-
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -634,6 +634,7 @@ class NoticeController extends PublicController
                     }
                 }
             }
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -706,6 +707,7 @@ class NoticeController extends PublicController
                 noticeUtil::push($text, '15280215347');
             }
             echo '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>';
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -885,6 +887,7 @@ class NoticeController extends PublicController
                 }
 
             }
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -980,10 +983,11 @@ class NoticeController extends PublicController
             }
             //请不要修改
             echo "success";
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
         }
     }
 
-}
+}

+ 1 - 1
app-hd/web/index.php

@@ -20,7 +20,7 @@ function dd($out)
 {
 	echo '<pre>';
 	print_r($out);
-	Yii::$app->end();
+	exit();
 }
 
 $application = new yii\web\Application($config);

+ 6 - 2
app-mall/controllers/NoticeController.php

@@ -86,6 +86,7 @@ class NoticeController extends PublicController
             if (!empty($text)) {
                 noticeUtil::push($text, '15280215347');
             }
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -226,7 +227,7 @@ class NoticeController extends PublicController
                     ShopExtClass::skRechargeReport($recharge);
                 }
             }
-
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -295,6 +296,7 @@ class NoticeController extends PublicController
                 $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], true);
                 ShopExtClass::newWorkRemind($shopExt, $order);
             }
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -412,6 +414,7 @@ class NoticeController extends PublicController
             }
             //请不要修改
             echo "success";
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
@@ -544,10 +547,11 @@ class NoticeController extends PublicController
             }
             //请不要修改
             echo "SUCCESS";
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
         }
     }
 
-}
+}

+ 2 - 1
app-mall/controllers/TestController.php

@@ -105,10 +105,11 @@ class TestController extends BaseController
             }
             //请不要修改
             echo "SUCCESS";
+            exit();
         } catch (\Exception $e) {
             $transaction->rollBack();
             Yii::error("失败原因:" . $e->getMessage());
         }
     }
 
-}
+}

+ 1 - 1
app-mall/web/index.php

@@ -5,7 +5,7 @@ function dd($out)
 {
 	echo '<pre>';
 	print_r($out);
-	Yii::$app->end();
+	exit();
 }
 
 require(__DIR__ . '/../../vendor/autoload.php');

+ 1 - 1
app-pt/web/index.php

@@ -5,7 +5,7 @@ function dd($out)
 {
 	echo '<pre>';
 	print_r($out);
-	Yii::$app->end();
+	exit();
 }
 
 require(__DIR__ . '/../../vendor/autoload.php');

+ 1 - 1
common/components/util.php

@@ -145,7 +145,7 @@ class util
     public static function stop($string = '')
     {
         echo $string;
-        Yii::$app->end();
+        exit();
     }
 
     public static function end()