no commit message

This commit is contained in:
annnj-company
2026-04-24 09:44:41 +08:00
parent 2838f08ac0
commit 67b175894a
3 changed files with 11 additions and 112 deletions

View File

@@ -1638,7 +1638,11 @@ function writeLog($log = '', $level = "writelog") {
* @return bool
*/
function pushToAllClients($eventName, $data) {
$socketUrl = 'http://127.0.0.1:2121';
// 读取.env文件中的push配置INI格式包含sections
$env = parse_ini_file(__DIR__ . '/../.env', true);
$push_config = isset($env['push']) ? $env['push'] : [];
$http_port = isset($push_config['http_port']) ? intval($push_config['http_port']) : 22120;
$socketUrl = 'http://127.0.0.1:' . $http_port;
$postData = [
'type' => 'broadcast',