From df2d934132296c7d147418d11a3d6833264b5f81 Mon Sep 17 00:00:00 2001
From: coolwhg <64748135@qq.com>
Date: Tue, 11 Jun 2019 11:39:29 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0PHP=E6=8E=A7=E5=88=B6?=
=?UTF-8?q?=E5=8F=B0=E8=BE=93=E5=87=BA=E5=87=BD=E6=95=B0=EF=BC=8CPHP?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=AD=E4=BD=BF=E7=94=A8console($var,$leve?=
=?UTF-8?q?l=3D'log')=EF=BC=8C=E5=8F=AF=E7=9B=B4=E6=8E=A5=E8=BE=93?=
=?UTF-8?q?=E5=87=BA=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF=E5=88=B0=E6=B5=8F?=
=?UTF-8?q?=E8=A7=88=E5=99=A8=E6=8E=A7=E5=88=B6=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/common.php | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/application/common.php b/application/common.php
index f60a28d03..95398b42d 100755
--- a/application/common.php
+++ b/application/common.php
@@ -362,3 +362,28 @@ if (!function_exists('hsv2rgb')) {
];
}
}
+
+if (!function_exists('console')) {
+ /**
+ * 控制台输出
+ * @param $var
+ * @param string $level
+ */
+ function console($var, $level = 'log')
+ {
+ if (is_array($var) || is_object($var)) {
+ $output = json_encode($var);
+ $jsonDecode = json_decode($output);
+ if (empty((array) $jsonDecode) && !empty($var)) {
+ echo "";
+ return;
+ }
+ } elseif (is_string($var)) {
+ $output = '"' . $var . '"';
+ } else {
+ $output = $var;
+ }
+ echo "";
+ return;
+ }
+}
\ No newline at end of file
--
Gitee
From a84cbe307b05b002d8a4d720d2da5cf353a2f5e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oo=E5=B0=8F=E5=88=9AoO?= <64748135@qq.com>
Date: Tue, 11 Jun 2019 11:41:23 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0PHP=E6=8E=A7=E5=88=B6?=
=?UTF-8?q?=E5=8F=B0=E8=BE=93=E5=87=BA=E5=87=BD=E6=95=B0=EF=BC=8CPHP?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=AD=E4=BD=BF=E7=94=A8console($var,$leve?=
=?UTF-8?q?l=3D'log')=EF=BC=8C=E5=8F=AF=E7=9B=B4=E6=8E=A5=E8=BE=93?=
=?UTF-8?q?=E5=87=BA=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF=E5=88=B0=E6=B5=8F?=
=?UTF-8?q?=E8=A7=88=E5=99=A8=E6=8E=A7=E5=88=B6=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/common.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/common.php b/application/common.php
index 95398b42d..25af353dc 100755
--- a/application/common.php
+++ b/application/common.php
@@ -365,7 +365,7 @@ if (!function_exists('hsv2rgb')) {
if (!function_exists('console')) {
/**
- * 控制台输出
+ * 控制台调试输出
* @param $var
* @param string $level
*/
--
Gitee
From 6d3d4c9a5c8a5c08501f6902cf796fc80b4620d0 Mon Sep 17 00:00:00 2001
From: "https://gitee.com/coolwhg" <>
Date: Tue, 11 Jun 2019 11:46:23 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0PHP=E6=8E=A7=E5=88=B6?=
=?UTF-8?q?=E5=8F=B0=E8=BE=93=E5=87=BA=E5=87=BD=E6=95=B0=EF=BC=8CPHP?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=AD=E4=BD=BF=E7=94=A8console($var,$leve?=
=?UTF-8?q?l=3D'log')=EF=BC=8C=E5=8F=AF=E7=9B=B4=E6=8E=A5=E8=BE=93?=
=?UTF-8?q?=E5=87=BA=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF=E5=88=B0=E6=B5=8F?=
=?UTF-8?q?=E8=A7=88=E5=99=A8=E6=8E=A7=E5=88=B6=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/common.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/common.php b/application/common.php
index 25af353dc..0fa368352 100755
--- a/application/common.php
+++ b/application/common.php
@@ -365,7 +365,7 @@ if (!function_exists('hsv2rgb')) {
if (!function_exists('console')) {
/**
- * 控制台调试输出
+ * 控制台调试
* @param $var
* @param string $level
*/
--
Gitee
From 64cef4bde07a83e1f0fe7bc3c3619f778b4be26b Mon Sep 17 00:00:00 2001
From: "coolwhg@163.com" <>
Date: Tue, 11 Jun 2019 11:51:33 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0PHP=E6=8E=A7=E5=88=B6?=
=?UTF-8?q?=E5=8F=B0=E8=BE=93=E5=87=BA=E5=87=BD=E6=95=B0=EF=BC=8CPHP?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=AD=E4=BD=BF=E7=94=A8console($var,$leve?=
=?UTF-8?q?l=3D'log')=EF=BC=8C=E5=8F=AF=E7=9B=B4=E6=8E=A5=E8=BE=93?=
=?UTF-8?q?=E5=87=BA=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF=E5=88=B0=E6=B5=8F?=
=?UTF-8?q?=E8=A7=88=E5=99=A8=E6=8E=A7=E5=88=B6=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/common.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/common.php b/application/common.php
index 0fa368352..25af353dc 100755
--- a/application/common.php
+++ b/application/common.php
@@ -365,7 +365,7 @@ if (!function_exists('hsv2rgb')) {
if (!function_exists('console')) {
/**
- * 控制台调试
+ * 控制台调试输出
* @param $var
* @param string $level
*/
--
Gitee
From 3fc203fd02ab043c6bf18ea051fe808ab79dab23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oo=E5=B0=8F=E5=88=9AoO?=
Date: Tue, 11 Jun 2019 11:55:46 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0PHP=E6=8E=A7=E5=88=B6?=
=?UTF-8?q?=E5=8F=B0=E8=BE=93=E5=87=BA=E5=87=BD=E6=95=B0=EF=BC=8CPHP?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=AD=E4=BD=BF=E7=94=A8console($var,$leve?=
=?UTF-8?q?l=3D'log')=EF=BC=8C=E5=8F=AF=E7=9B=B4=E6=8E=A5=E8=BE=93?=
=?UTF-8?q?=E5=87=BA=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF=E5=88=B0=E6=B5=8F?=
=?UTF-8?q?=E8=A7=88=E5=99=A8=E6=8E=A7=E5=88=B6=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/common.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/common.php b/application/common.php
index 25af353dc..95398b42d 100755
--- a/application/common.php
+++ b/application/common.php
@@ -365,7 +365,7 @@ if (!function_exists('hsv2rgb')) {
if (!function_exists('console')) {
/**
- * 控制台调试输出
+ * 控制台输出
* @param $var
* @param string $level
*/
--
Gitee