james.rus52 / phpfrm
PHP 框架
1.8.2
2021-06-28 15:38 UTC
Requires
- php: ^7.2|^8.0
- monolog/monolog: ^2.0
- swiftmailer/swiftmailer: ^5.3|^6.0
- vlucas/phpdotenv: ^5.0
Requires (Dev)
- phpunit/phpunit: ^9.0
README
如何安装
在您应用程序的根目录下创建一个 composer.json 文件
{ "autoload" : { "psr-4" : { "app\\": "app" } }, "require" : { "james.rus52/phpfrm": "^1.7", "phpmailer/phpmailer": "~6.0", } }
安装框架
composer install
将项目模板从 vendor/james.rus52/phpfrm 复制到您的根目录
复制后看起来像这样
/
/app
/controllers
/AppController.php
/MainController.php
/models
/AppModel.php
/MainModel.php
/views
/Main
/index.php
/layouts
/default.php
/widgets
/menu
/Menu.php
/layout_app.php
/public
/index.php
/.htaccess
/js
/css
/img
/plugins
/tmp
/cache
/logs
/.htaccess
/vendor
/james.rus52/phpfrm
/composer.json
如何使用
在 /views/layouts/default.php 中更改您的网站布局,创建额外的页面如 index.php
- 在 /app/controllers 中创建一个控制器,扩展 AppController 类
- 在 /app/models 中创建一个模型,扩展 AppModel 类
- 在 /app/views/ 中创建一个视图
配置
您可以在 /config 文件夹中管理路由和设置