由于EM6.0时间函数变了
已经不存在emStrtotime函数了,
所以你们调用会错误的
这个本来不是我的问题
要找模板作者的
既然你进了我的EM6.0的坑
还是帮你们解决吧
方法
老样子去模板中找
可能在module.php 或者 functions.php,
搜索displayRecordItem($record),(注:有可能不是这个,看作者)
还是要看模板设计者放哪里,
你问我也不知道,毕竟不是我设计的
好了修复方案如下,很简单
把emStrtotime改成strtotime就行
我大概写个吧,我也不知道你们的写法
部分代码
- function displayRecordItem($record){
- if (preg_match("/^([\d]{4})([\d]{2})$/", $record, $match)) {
- $days = getMonthDayNum($match[2], $match[1]);
- $record_stime = strtotime($record . '01');
- $record_etime = $record_stime + 3600 * 24 * $days;
- } else {
- $record_stime = strtotime($record);
- $record_etime = $record_stime + 3600 * 24;
- }
- $sql = "and date>=$record_stime and date<$record_etime order by top desc ,date desc";
- $result = archiver_db($sql);
- return $result;
- }
最后提个建议
以后连接数据库
不要使用
$DB = MySql::getInstance(); 或者
$DB = MySqlii::getInstance();
毕竟EM6.0连接方式改了,让系统自动选择
请使用
$DB = Database::getInstance();
我只是提个建议
换不换是你们的事
完工.
就这样
这篇帖子太好了
改了也不行,很无助,用不了其它模板
@友吧网: 你不会看另外一篇呀 我汗