From 62b01bf566afb54024f875052afe8c6f7be3a8df Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 25 May 2016 16:10:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20=E6=94=B9=E8=BF=9Bstart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Response.php | 2 +- start.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/library/think/Response.php b/library/think/Response.php index d531979f..5b86e940 100644 --- a/library/think/Response.php +++ b/library/think/Response.php @@ -100,7 +100,7 @@ class Response $data = call_user_func_array($this->transform, [$data]); } - define('RESPONSE_TYPE',$this->type); + defined('RESPONSE_TYPE') or define('RESPONSE_TYPE',$this->type); // 处理输出数据 $data = $this->output($data); diff --git a/start.php b/start.php index b5a209ee..970fc937 100644 --- a/start.php +++ b/start.php @@ -21,7 +21,10 @@ if (is_file(ROOT_PATH . 'env' . EXT)) { $env = include ROOT_PATH . 'env' . EXT; foreach ($env as $key => $val) { $name = ENV_PREFIX . $key; - putenv("$name=".var_export($var,true)); + if(is_bool($val)){ + $val = $val ? 1 : 0; + } + putenv("$name=$var"); } } // 自动识别调试模式