该系统为使用PHP开发的基于web的Subversion(SVN)服务器端管理工具。支持功能:SVN仓库管理、SVN用户管理、SVN分组管理、目录授权、目录浏览、Hooks管理、在线dump备份、在线备份恢复、SVN用户禁用、服务器状态管理、日志管理、消息通知、更新检测...
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 与守护进程通信
|
|
|
|
*/
|
|
|
|
function FunRequestReplyExec($shell)
|
|
|
|
{
|
|
|
|
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP) or die("error:" . socket_strerror(socket_last_error()));
|
|
|
|
$server = socket_connect($socket, IPC_ADDRESS, (int)IPC_PORT);
|
|
|
|
socket_write($socket, $shell);
|
|
|
|
$reply = socket_read($socket, (int)SOCKET_READ_LENGTH);
|
|
|
|
socket_close($socket);
|
|
|
|
return $reply;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 守护进程状态探测
|
|
|
|
* 0 超时
|
|
|
|
* 1 打开
|
|
|
|
* 2 关闭
|
|
|
|
*/
|
|
|
|
function FunDetectState()
|
|
|
|
{
|
|
|
|
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
|
|
|
|
|
|
|
socket_set_nonblock($sock);
|
|
|
|
|
|
|
|
socket_connect($sock, IPC_ADDRESS, (int)IPC_PORT);
|
|
|
|
|
|
|
|
socket_set_block($sock);
|
|
|
|
|
|
|
|
$v = array($sock);
|
|
|
|
|
|
|
|
$state = @socket_select($r = $v, $w = $v, $f = $v, 5);
|
|
|
|
|
|
|
|
socket_close($sock);
|
|
|
|
|
|
|
|
return $state;
|
|
|
|
}
|