diff --git a/public/index.php b/public/index.php index cc46f0a..bd4b0e3 100644 --- a/public/index.php +++ b/public/index.php @@ -5,6 +5,20 @@ use support\App; + + +// 尝试手动创建日志文件并赋予权限(仅在有目录权限时有效) +$logFile = '/runtime/logs/webman-' . date('Y-m-d') . '.log'; +if (!file_exists($logFile)) { + // 创建文件 + touch($logFile); + // 尝试设置权限(可能需要服务器用户权限) + chmod($logFile, 0666); +} + + + + chdir(__DIR__); require_once __DIR__ . '/../vendor/autoload.php';