From 0efd71ebee09981034a9c670a04eb39253623c17 Mon Sep 17 00:00:00 2001 From: eecjimmy Date: Fri, 23 Nov 2018 19:28:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E7=89=88=E6=9C=ACyi?= =?UTF-8?q?i2=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UEditorAction.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UEditorAction.php b/UEditorAction.php index 8eaec18..969be24 100644 --- a/UEditorAction.php +++ b/UEditorAction.php @@ -5,6 +5,7 @@ use Yii; use yii\base\Action; use yii\helpers\ArrayHelper; +use yii\web\Response; class UEditorAction extends Action { @@ -27,7 +28,12 @@ public function init() public function run() { + ob_start(); $this->handleAction(); + $content = ob_get_contents(); + ob_clean(); + Yii::$app->response->format = Response::FORMAT_RAW; + return $content; } /**