Prechádzať zdrojové kódy

无用文件夹去除

PC-202304251453\Administrator 6 mesiacov pred
rodič
commit
a060526c84

+ 0 - 42
app/controller/IndexController.php

@@ -1,42 +0,0 @@
-<?php
-
-namespace app\controller;
-
-use support\Request;
-
-class IndexController
-{
-    public function index(Request $request)
-    {
-        return <<<EOF
-<style>
-  * {
-    padding: 0;
-    margin: 0;
-  }
-  iframe {
-    border: none;
-    overflow: scroll;
-  }
-</style>
-<iframe
-  src="https://www.workerman.net/wellcome"
-  width="100%"
-  height="100%"
-  allow="clipboard-write"
-  sandbox="allow-scripts allow-same-origin allow-popups"
-></iframe>
-EOF;
-    }
-
-    public function view(Request $request)
-    {
-        return view('index/view', ['name' => 'webman']);
-    }
-
-    public function json(Request $request)
-    {
-        return json(['code' => 0, 'msg' => 'ok']);
-    }
-
-}

+ 0 - 42
app/middleware/StaticFile.php

@@ -1,42 +0,0 @@
-<?php
-/**
- * This file is part of webman.
- *
- * Licensed under The MIT License
- * For full copyright and license information, please see the MIT-LICENSE.txt
- * Redistributions of files must retain the above copyright notice.
- *
- * @author    walkor<walkor@workerman.net>
- * @copyright walkor<walkor@workerman.net>
- * @link      http://www.workerman.net/
- * @license   http://www.opensource.org/licenses/mit-license.php MIT License
- */
-
-namespace app\middleware;
-
-use Webman\MiddlewareInterface;
-use Webman\Http\Response;
-use Webman\Http\Request;
-
-/**
- * Class StaticFile
- * @package app\middleware
- */
-class StaticFile implements MiddlewareInterface
-{
-    public function process(Request $request, callable $handler): Response
-    {
-        // Access to files beginning with. Is prohibited
-        if (strpos($request->path(), '/.') !== false) {
-            return response('<h1>403 forbidden</h1>', 403);
-        }
-        /** @var Response $response */
-        $response = $handler($request);
-        // Add cross domain HTTP header
-        /*$response->withHeaders([
-            'Access-Control-Allow-Origin'      => '*',
-            'Access-Control-Allow-Credentials' => 'true',
-        ]);*/
-        return $response;
-    }
-}

+ 0 - 29
app/model/Test.php

@@ -1,29 +0,0 @@
-<?php
-
-namespace app\model;
-
-use support\Model;
-
-class Test extends Model
-{
-    /**
-     * The table associated with the model.
-     *
-     * @var string
-     */
-    protected $table = 'test';
-
-    /**
-     * The primary key associated with the table.
-     *
-     * @var string
-     */
-    protected $primaryKey = 'id';
-
-    /**
-     * Indicates if the model should be timestamped.
-     *
-     * @var bool
-     */
-    public $timestamps = false;
-}

+ 0 - 14
app/view/index/view.html

@@ -1,14 +0,0 @@
-<!doctype html>
-<html>
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link rel="shortcut icon" href="/favicon.ico"/>
-    <title>webman</title>
-
-</head>
-<body>
-hello <?=htmlspecialchars($name)?>
-</body>
-</html>