Files
webman_duanju/public/index.php
2025-08-18 09:12:18 +08:00

39 lines
780 B
PHP

<?php
/**
* index.php - Web 面板启动 Workerman/Webman
*/
use support\App;
// 尝试手动创建日志文件并赋予权限(仅在有目录权限时有效)
$logFile = '/runtime/logs/webman-' . date('Y-m-d') . '.log';
if (!file_exists($logFile)) {
// 创建文件
touch($logFile);
// 尝试设置权限(可能需要服务器用户权限)
chmod($logFile, 0666);
}else {
if(!is_writable($logFile)) {
chmod($logFile, 0666);
}
}
chdir(__DIR__);
require_once __DIR__ . '/../vendor/autoload.php';
ini_set('display_errors', 'on');
error_reporting(E_ALL);
// 进程文件
$runtimeProcessPath = __DIR__ . '/../runtime/windows';
$processFiles = glob($runtimeProcessPath . '/start_*.php');
App::loadAllConfig(['route']);
App::run();
?>