e282486518
- e282486518 回复了 snfnwgi 的评论
为什么你的配置文件是在 .env.example这个里面,官方的那个配置文件怎么不用呢
官方配置文件\common\config.php吗?相比.env配置简单一些,方便进行全局配置。有些在安装的时候既要配置公共的配置又要配置前后台的配置,不方便,直接配置这个简单暴力。
- e282486518 回复了 夏午茶 的评论
我也做了一个,希望一起交流学习: https://github.com/gaojiyong/admin_xwc
@夏午茶 backend/behaviors/RbacBehavior.php 以行为和事件的方式检查权限,类似yii2\filters\AccessControl.php
- e282486518 回复了 EVANSS 的评论
有些CSS样式没加载到
重新删掉web/assets文件夹试试,之前升级yii2框架后我也出现过这个问题,删掉后重新访问就可以了,第一次访问的时候要多等几秒钟,期间不要关掉这个页面,不然会出现有些js或css没加载的情况
- e282486518 回复了 夏午茶 的评论
我也做了一个,希望一起交流学习: https://github.com/gaojiyong/admin_xwc
@夏午茶 每个操作都是进行rbac权限检查了的。
- e282486518 回复了 wangkaixi521 的评论
安装后出现 Fatal error: Call to undefined function env() in C:\phpStudy\yii\yii2admin\common\config\main-local.php on line 7
是不是读出不到evn类,但根目录已经生成过了呀!!求解!
应该是composer install安装错误,导致这个没有安装成功:
"autoload": { "files": [ "common/env.php" ] }
建议执行composer update试试
- e282486518 回复了 tur80232007 的评论
打开http://localhost/yii2admin-master/backend/web/index.php,有以下错误:
Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
查看apache 提示错误: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
主要是:4、参照 doc 目录下的Nginx和Apache配置文件,配置服务器,并设置hosts文件。
这一布不会配置,楼主能不能给说说@tur80232007 什么是数据库刷新出来很慢?是第一次访问页面的时候很慢吗,这是因为assets发布出来要点时间,第二次访问就正常了。。。
- e282486518 回复了 lxj 的评论
Fatal error: Uncaught exception 'yii\base\InvalidParamException' with message 'Invalid path alias: @storageUrl/image/' in C:\phpStudy\WWW\yii2admin-master\vendor\yiisoft\yii2\BaseYii.php:152 Stack trace: #0 C:\phpStudy\WWW\yii2admin-master\common\config\params.php(25): yii\BaseYii::getAlias('@storageUrl/ima...') #1 C:\phpStudy\WWW\yii2admin-master\frontend\config\main.php(3): require('C:\phpStudy\WWW...') #2 C:\phpStudy\WWW\yii2admin-master\frontend\web\index.php(20): require('C:\phpStudy\WWW...') #3 {main} thrown in C:\phpStudy\WWW\yii2admin-master\vendor\yiisoft\yii2\BaseYii.php on line 152
新手求解@17too 开源的,需要可以随时下载。这个是我学习Yii的动力肯定会坚持下去的。预计明年的45月份相应的功能会完善。