ush-webdev / cms
Yii 2 cms 应用程序模板
dev-master
2017-04-07 09:35 UTC
This package is not auto-updated.
Last update: 2024-09-29 00:52:46 UTC
README
Yii 2 Minimal Application Template 是一个适合从零开始的骨架式 Yii 2 应用程序。
该模板包含基本功能,包括用户登录/注销。它包含所有常用配置,使您能够专注于添加新功能到您的应用程序。
目录结构
commands/ contains console commands (controllers)
config/ contains application configurations
controllers/ contains Web controller classes
models/ contains model classes
runtime/ contains files generated during runtime
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
web/ contains the entry script and Web resources
需求
此应用程序模板的最低要求是您的 Web 服务器支持 PHP 5.4.0。
安装
如果您没有 Composer,您可以通过在 getcomposer.org 上找到的说明进行安装。
然后,您可以使用以下命令安装此应用程序模板
php composer global require "fxp/composer-asset-plugin:~1.1.0"
composer create-project --prefer-dist --stability=dev ush-webdev/cms nanocms
现在,假设您的服务器 webroot 指向 project/web 目录,您应该能够通过以下 URL 访问应用程序。
https:///
配置
数据库
使用真实数据编辑文件 config/db.php,例如
return [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=yii2minimal', 'username' => 'root', 'password' => '1234', 'charset' => 'utf8', ];
备注
- Yii 不会为您创建数据库,您必须手动创建它,才能访问。
- 检查并编辑
config/目录中的其他文件,以根据需要自定义您的应用程序。