From f7a9c49681dc0ea1facd24aa9ae4c998c02d510d Mon Sep 17 00:00:00 2001 From: witersen <1801168257@qq.com> Date: Wed, 3 Aug 2022 22:18:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AE=88=E6=8A=A4=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E8=AD=A6=E5=91=8A=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02.php/server/svnadmind.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/02.php/server/svnadmind.php b/02.php/server/svnadmind.php index e248249..908232a 100644 --- a/02.php/server/svnadmind.php +++ b/02.php/server/svnadmind.php @@ -95,10 +95,15 @@ class Daemon //接收客户端发送的数据 $receive = socket_read($client, $this->config_daemon['SOCKET_READ_LENGTH']); - $receive = unserialize($receive); + $type = 'detect'; + $content = ''; - $type = $receive['type']; - $content = $receive['content']; + if (!empty($receive)) { + $receive = unserialize($receive); + + $type = $receive['type']; + $content = $receive['content']; + } //console模式 if ($this->workMode == 'console') { @@ -268,7 +273,7 @@ class Daemon echo '检出SVN仓库前请注意放行协议端口(默认3690)' . PHP_EOL; echo '已自动更改系统加密密钥,在线用户会退出登录' . PHP_EOL; echo '建议将本程序通过nohup启动或加入系统管理' . PHP_EOL; - + chdir('/'); umask(0); if (defined('STDIN')) {