This commit is contained in:
Default
2025-03-18 22:51:45 +08:00
parent eb9035a7ae
commit 526d3f47f4
103 changed files with 542 additions and 4025 deletions

View File

@@ -1,17 +1,37 @@
<?php
declare (strict_types = 1);
declare(strict_types=1);
namespace app\home\controller;
class Index
use app\home\BaseController;
use storage\StorageCore;
use think\facade\View;
class Index extends BaseController
{
public function index()
{
$arrConfig = config();
echo '<pre>';
print_r($arrConfig);
echo '</pre>';
// exit;
return '您好!这是一个[home]示例应用';
return View::fetch();
}
public function test()
{
$strNovelKey = "novels/12/chapters/3001.txt";
$StorageCore = StorageCore::getInstance();
// $content = '我是一个大傻逼';
$content = file_get_contents('123.txt');
if ($StorageCore->has($strNovelKey)) {
// $MinIO->update($strNovelKey, $content); // 更新已有文件
} else {
$StorageCore->write($strNovelKey, $content); // 创建新文件
}
echo $StorageCore->read($strNovelKey);
return;
}
}

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace app\home\controller;
use app\home\BaseController;
use storage\StorageCore;
use think\facade\View;
class Novel extends BaseController
{
public function index()
{
return View::fetch();
}
}