OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

32
index.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
// Define the public path
define('PUBLIC_PATH', __DIR__.'/public');
// Check if the requested file exists in public directory
$requestUri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$publicFile = PUBLIC_PATH.$requestUri;
if (file_exists($publicFile) && is_file($publicFile)) {
// If it's a static file in public, serve it directly
$extension = pathinfo($publicFile, PATHINFO_EXTENSION);
$mimeTypes = [
'css' => 'text/css',
'js' => 'application/javascript',
'png' => 'image/png',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'gif' => 'image/gif',
'svg' => 'image/svg+xml',
];
if (isset($mimeTypes[$extension])) {
header('Content-Type: '.$mimeTypes[$extension]);
}
readfile($publicFile);
exit;
}
// Otherwise, include the main application entry point
require PUBLIC_PATH.'/index.php';