基于yii2的内容管理框架 [ 2.0 版本 ]
yidashi
注册时间:2015-06-26
最后登录:2018-11-07
在线时长:86小时19分
最后登录:2018-11-07
在线时长:86小时19分
- 粉丝77
- 金钱10060
- 威望240
- 积分13320
热门源码
- 整合完 yii2-rbac+yii2-admin+adminlte 等库的基础开发后台源码
- 适合初学者学习的一款通用的管理后台
- 基于 Yii 2 + Bootstrap 3 搭建一套后台管理系统 CMF
- yii-goaop - 将 goaop 集成到 Yii,在 Yii 中优雅的面向切面编程
- yii-log-target - 监控系统异常且多渠道发送异常信息通知
- 店滴云1.3.0
- 面向对象的一小步:添加 ActiveRecord 的 Scope 功能
- Yii2 开源商城 FecShop
- 基于 Yii2 开发的多店铺商城系统,免费开源 + 适合二开
- leadshop - 基于 Yii2 开发的一款免费开源且支持商业使用的商城管理系统
共 68 条评论
后台出现这个错误
PHP Core Warning – yii\base\ErrorException PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/php_pgsql.dll, 9): image not found
查了半天都解决不了,我mac 自带的php 没有pgsql.so 自己编译安装有老是出错
我用mac os x 10.11.4 有大神帮忙吗?感激不尽!
你这是php本身有错误吧。
@yidashi 不知道这个pgsql是什么东西 运行别的程序不报错,运行你的就报这个错误,有解决方案吗?
@skp1100 pgsql是PostgreSQL数据库的php组件,我压根就没用这个数据库。你确定你用这个php运行别的程序不报错?你别玩我啊。是真的话,我也不知道什么原因。。。抱歉啊
数据库文件导入错误init.sql
静态分析:
分析时发现13个错误。
Unexpected character. (near ":" at position 27029) Unexpected beginning of statement. (near "DOCTYPE" at position 2) Unexpected beginning of statement. (near "html" at position 10) Unexpected beginning of statement. (near "html" at position 17) Unexpected beginning of statement. (near "lang" at position 22) Unexpected beginning of statement. (near ""en"" at position 27) Unexpected beginning of statement. (near "class" at position 32) Unexpected beginning of statement. (near "" is-copy-enabled emoji-size-boost"" at position 38) Unexpected beginning of statement. (near "head" at position 78) Unexpected beginning of statement. (near "prefix" at position 83) Unexpected beginning of statement. (near ""og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#"" at position 90) Unexpected beginning of statement. (near "meta" at position 248) Unrecognized statement type. (near "charset" at position 253)
恩。是有问题。更新了下sql文件。
好像还是不行,你确定可以了?
@skp1100 为了验证你这句话,我又试了一次,貌似是可以。
不错。。。。
没有这张表 pop_system_log
@skp1100 已更新
怎么图像和头像都可以上传,但不会显示出来的?查看源码是这样的:
<img src="http://127.0.0.1/yii/static/upload/image/20160520/1463753248.jpg">
而你的站点
http://www.51siyuan.cn/my/profile
查看源码图像对应的却是这样的:
<img src="http://image.51siyuan.cn/FoCjtKUb_3Q8Amdl7hiNfGJ_Tz00"
Invalid Parameter – yii\base\InvalidParamException
The view file does not exist: E:\web\yii2cmf-master\frontend\views\site\index.php
@优友 demo帐号被人禁用了,现在可以了。你说的这个问题不存在的,我还专门重新照着我自己写的文档部署了一遍。如果你是很早前下载的,可能会有问题,你下载最新的试试。抱歉。
@yidashi 哦,怎么我下载了你的源码,老是出现下面的问题的:
Invalid Parameter – yii\base\InvalidParamException
The view file does not exist: E:\web\yii2cmf-master\frontend\views\site\index.php
我也是按照你说的步骤做了,执行init初始化,用最新的数据文件init.sql
@yidashi 执行./init 也没有用,执行了后是在web目录下产生index.php文件,但是访问时提示的是frontend\views\site\下没有index.php入口文件
然后我的配置文件frontend/config/main.php也有下面这一句:
'as ThemeBehavior' => \frontend\components\ThemeBehavior::className()
@优友 我今天早上刚按照我自己写的步骤一步一步来的,100%没有问题。压根就不需要什么frontend\views\site\index.php。下最新的代码,一步一步来。
@yidashi 我是用phpStudy 的nginx作本地服务的,而且你看看你的评论有很多人说到同样的问题。
@优友 跟apache nginx iis没啥关系。以前有问题,后来更新修复过了。
@yidashi 我昨天下载的是2.coding 就出现上面的问题。
刚刚我再次下载 1.github 重新本地配置就可以了,谢谢了。向你学习。
但现在进去后台管理在内容管理下面的单页管理会出现错误:
syntax error, unexpected '['
1. in E:\web\yii2cmf-master\backend\views\page\index.php at line 26
@优友 不好意思coding忘了更新。。这个错误应该是因为是php版本的问题,你把
'id', [ 'attribute' => 'use_layout', 'value' => function ($model) { $arr = ['不使用', '使用']; return $arr[$model->use_layout]; }, ],
那两行换成这个试试
@yidashi 谢谢了,可以了。
演示地址后台登录不了 密码错误
http://www.51siyuan.cn/admin/ demo 111111可以啊,刚登了试了试
@yidashi 不能登录
web 下面没有index.php文件啊
用户名和密码不对~~~
我自己也搞了一个 不过是用 H-ui 搞了的 看来哥们搞的不错 细节上做的很好 研究下
SQL 查询:
我命令导入错误,直接导入sql语句报错:
INSERT INTO `pop_category` VALUES ( 1, '默认', 0, 1449050838, 1449050838, 'moren' ) ; MySQL 返回: 文档 #1136 - Column count doesn't match value count at row 1
能给一份正常的init.sql给我们吗
更新了。如果还有不完整的直接私信我,加了新功能忘了更新数据库,不好意思。
Database Exception – yii\db\Exception SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' The SQL being executed was: SELECT MAX(updated_at) FROM `pop_page` Error Info: Array ( [0] => 42S22 [1] => 1054 [2] => Unknown column 'updated_at' in 'field list' ) ↵ Caused by: PDOException SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' in D:\website\yii2cmf\vendor\yiisoft\yii2\db\Command.php at line 837
非常不错,学习
数据库的表不完整,可以再上传一份数据库的表吗
确实是,我下载下来也是
@feifeiaini1 请问你们现在有正确的完整的sql了吗,跪求
Invalid Parameter – yii\base\InvalidParamException
The view file does not exist: E:\BaiduYunDownload\yii\frontend\views\site\index.php
1. in E:\BaiduYunDownload\yii\vendor\yiisoft\yii2\base\View.php at line 226
怎么会提示这样的错误呢?
因为不熟悉yii。所以我只好把所有log都打出来给您看了--!。我的环境是centos php7 nginx
在访问localhost/yii-master/frontend/web/index.php时的报错如下:
An Error occurred while handling another error: yii\base\InvalidParamException: The view file does not exist: /home/study/yii-master/frontend/views/site/error.php in /home/study/yii-master/vendor/yiisoft/yii2/base/View.php:226 Stack trace: #0 /home/study/yii-master/vendor/yiisoft/yii2/base/View.php(149): yii\base\View->renderFile('/home/study/yii...', Array, Object(frontend\controllers\SiteController)) #1 /home/study/yii-master/vendor/yiisoft/yii2/base/Controller.php(371): yii\base\View->render('error', Array, Object(frontend\controllers\SiteController)) #2 /home/study/yii-master/vendor/yiisoft/yii2/web/ErrorAction.php(108): yii\base\Controller->render('error', Array) #3 [internal function]: yii\web\ErrorAction->run() #4 /home/study/yii-master/vendor/yiisoft/yii2/base/Action.php(92): call_user_func_array(Array, Array) #5 /home/study/yii-master/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\Action->runWithParams(Array) #6 /home/study/yii-master/vendor/yiisoft/yii2/base/Module.php(455): yii\base\Controller->runAction('error', Array) #7 /home/study/yii-master/vendor/yiisoft/yii2/web/ErrorHandler.php(85): yii\base\Module->runAction('site/error') #8 /home/study/yii-master/vendor/yiisoft/yii2/base/ErrorHandler.php(109): yii\web\ErrorHandler->renderException(Object(yii\web\NotFoundHttpException)) #9 /home/study/yii-master/vendor/yiisoft/yii2/web/Application.php(98): yii\base\ErrorHandler->handleException(Object(yii\web\NotFoundHttpException)) #10 /home/study/yii-master/vendor/yiisoft/yii2/base/Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request)) #11 /home/study/yii-master/frontend/web/index.php(19): yii\base\Application->run() #12 {main} Previous exception: yii\web\NotFoundHttpException: 页面不存在 in /home/study/yii-master/frontend/controllers/PageController.php:19 Stack trace: #0 [internal function]: frontend\controllers\PageController->actionIndex('') #1 /home/study/yii-master/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array) #2 /home/study/yii-master/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array) #3 /home/study/yii-master/vendor/yiisoft/yii2/base/Module.php(455): yii\base\Controller->runAction('index', Array) #4 /home/study/yii-master/vendor/yiisoft/yii2/web/Application.php(84): yii\base\Module->runAction('page/index', Array) #5 /home/study/yii-master/vendor/yiisoft/yii2/base/Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request)) #6 /home/study/yii-master/frontend/web/index.php(19): yii\base\Application->run() #7 {main}
可能是数据库里少数据。我又更新了一下init.sql
@yidashi
我在windows下测试了最新数据库。
根据报错
Invalid Parameter – yii\base\InvalidParamException
The view file does not exist: D:\phpStudy\WWW\yii-master\frontend\views\site\index.php
来看,应该是缺少views的映射关系(不知道这么用词准确不)?
frontend目录下没有views目录。
@yidashi 我在windows下测试了最新数据库。
根据报错
Invalid Parameter – yii\base\InvalidParamException
The view file does not exist: D:\phpStudy\WWW\yii-master\frontend\views\site\index.php
来看,应该是缺少views的映射关系(不知道这么用词准确不)?
frontend目录下没有views目录。
@littlerunner
'as ThemeBehavior' => \frontend\components\ThemeBehavior::className()
你的配置文件里没有这句吗?frontend/config/main.php
@yidashi 有这句,这两句在一起
'as ThemeBehavior' => \frontend\components\ThemeBehavior::className(),
'as RouteBehavior' => \frontend\components\RouteBehavior::className(),
@littlerunner 那没问题啊,views的已经改到themes/basic了
@yidashi 请问你现在有完整的正确的sql了吗, 楼主github上的还是错的
显示缺少page表。
确实没有,加上了
在评论回复的时候,那个"@"和username和后边的回复内容 分的好开,中间好多空格,这个怎么调?
是怎么把frontend里的views文件夹改成themes/basic的
frontend配的一个行为,代码在
frontend/components/ThemeBehavior.php
能发个带数据的库吗?
能发了带数据的库吗?数据表都是空的,在本地报错
从哪里获取数据表结构
前台config下的main.php缺少view目录配置。
'view' => [ 'theme' => [ 'basePath' => '@app/themes/basic', 'baseUrl' => '@web/themes/basic', 'pathMap' => [ '@app/views' => '@app/themes/basic', ], ], ],
主题配置我放在themebehavior里了
为什么我指到根目录访问的时候总是报404~
<VirtualHost *:80> ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "f:/source/git/yii" ServerName yiimanage.com ErrorLog "logs/yiimanage.com-error.log" CustomLog "logs/yiimanage.com-access.log" common </VirtualHost>
Not Found The requested URL /backend/web/site/login was not found on this server. Apache/2.4.9 (Win64) PHP/5.5.12 Server at yiimanage.com Port 80
确定apache开重写模块了没,AllowOverride all了没
@yidashi 确实已经开启了