namesonic/simple-site-framework

简单站点框架

v0.1.6 2023-12-12 05:59 UTC

This package is auto-updated.

Last update: 2024-09-12 07:53:06 UTC


README

使用此工具通过轻量级的MVC结构(无M)搭建简单HTML模板项目。

功能

  • 轻量级MVC结构(无M)
  • 多布局
  • 无CSS/js依赖
  • 简单的模板变量替换处理
  • 配置处理
  • 异常处理

要求

  • PHP 8.1 或更高版本

安装

将下面的 my-site-name 替换为包含您新网站的文件夹名称。

composer create-project namesonic/simple-site my-site-name

配置

您的Web服务器应该配置为将文档根目录指向 my-site-name/public 文件夹。

开发

app\
    Http\
        Controllers\
            Add new pages to the website here
        Exceptions\
            Add custom code exception handlers here
config\
    Store configuration files here
public\
    This is the public facing folder for the application
    js\
    css\
    img\
resources\
    errordocs\
        Website errordocuments are served from this folder <404.php>
    layouts\
        Global template layouts are stored here <layoutname.php>
    views\
        Individual page layouts are stored here <pagename.php>