From e653fdac6d218a55f2041576d1d05c9d76347360 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Fri, 1 Mar 2024 23:45:13 +0800 Subject: [PATCH] fix getip() --- app/Console/Commands/Test.php | 4 ++-- include/constants.php | 2 +- include/globalfunctions.php | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index 09ea04e6..9da9fd06 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -98,8 +98,8 @@ class Test extends Command */ public function handle() { - $str = "2023-11-14 02:59:00"; - $diff = Carbon::parse($str)->diffInDays(now()); + $str = "abc"; + $diff = strstr($str, ",", true); dd($diff); } diff --git a/include/constants.php b/include/constants.php index ba074904..71c1fd47 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@