十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團隊
量身定制 + 運營維護+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
[e:loop={1,2,0,1}]
10年積累的網(wǎng)站設計制作、成都做網(wǎng)站經(jīng)驗,可以快速應對客戶對網(wǎng)站的新想法和需求。提供各種問題對應的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡服務。我雖然不認識你,你也不認識我。但先做網(wǎng)站后付款的網(wǎng)站建設流程,更有輝縣免費網(wǎng)站建設讓你可以放心的選擇與我們合作。
p
年:?=date('Y',$bqr[newstime])?
月:?=date('m',$bqr[newstime])?
日:?=date('d',$bqr[newstime])?
時:?=date('H',$bqr[newstime])?
分:?=date('i',$bqr[newstime])?
秒:?=date('s',$bqr[newstime])?
/p
[/e:loop]
你好,根據(jù)你的問題所知道的結果是你的服務器或者網(wǎng)站空間上的時間設置問題。如果服務器空間時間正確就參考下面的方法看看。
有什么錯誤?
用帝國CMS建站時,有時候會用到采集,但是在采集發(fā)布內(nèi)容的時候會出現(xiàn)時間顯示為1970-01-01,這是為什么呢?其實是因為在建立系統(tǒng)模型的時候,沒有把newstime字段設置成錄入項、可修改、可增加。那么遇到這樣問題我們可以用以下方法解決。
為什么出現(xiàn)錯誤?
當編輯文檔時,如果newstime=\'0\', 則帝國cms系統(tǒng)顯示為1970-01-01。出現(xiàn)這個錯誤主要是因為當 建立系統(tǒng)模型的時候,沒有把newstime字段設置成錄入項、可修改、可增加時,newstime使用了系統(tǒng)系統(tǒng)默認值:0
怎么解決處理這個錯誤?
(1)已添加文章,已出現(xiàn)錯誤時:通過帝國cms后臺執(zhí)行SQL語句來修改數(shù)據(jù)庫。
第一步:點擊系統(tǒng)》備份與恢復數(shù)據(jù)》執(zhí)行SQL語句
第二步:第二步:在sql執(zhí)行框中輸入 UPDATE phome_ecms_news SET newstime = truetime where newstime=\'0\' 點擊執(zhí)行SQL。然后更新網(wǎng)站
(2)未添加文章,未出現(xiàn)錯誤時。
第一步:點擊系統(tǒng)》數(shù)據(jù)表與系統(tǒng)模型》管理數(shù)據(jù)表
第二步:點擊新聞系統(tǒng)表后面的 管理系統(tǒng)模型
第三步:在管理系統(tǒng)模型中點擊修改,打開修改系統(tǒng)模型窗口
第四步:找到發(fā)布時間,將錄入項、可增加、可修改三項勾選上,其他默認,點擊提交
在首頁模板中加入下面代碼,盡量放在底部。
script language="javascript" type="text/javascript" src="/e/htmlindex/index_html.php"/script
在 /e/ 建立文件夾 htmlindex 并設置 777權限
將下面代碼保存在 /e/htmlindex/index_html.php
修改刷新時間,將文件中1200改為你想要的時間,單位為秒。
?php
require("../class/connect.php");
include("../class/db_sql.php");
include("../class/config.php");
include("../class/functions.php");
include("../class/t_functions.php");
require?LoadLang("pub/fun.php");
require("../data/dbcache/class.php");
require("../data/dbcache/MemberLevel.php");
include("../class/chtmlfun.php");?
$link=db_connect();
$empire=new?mysqlquery();
$filepath_s="indexhtmlhc.txt";
$time=time();
@$filemtime=(int)filemtime($filepath_s)+1200;
/*
函數(shù)解釋
file_exists()?函數(shù)檢查文件或目錄是否存在。
mkdir()?函數(shù)創(chuàng)建目錄。
time()?函數(shù)返回當前時間的?Unix?時間戳。
filemtime()?函數(shù)返回文件內(nèi)容上次的修改時間。
*/
if?(!file_exists($filepath_s)){
fopen($filepath_s,?'w');
@chmod($filepath_s,?0777);
ReIndex();
}elseif(!file_exists($filepath_s)?||?(filemtime($filepath_s)+1200)time()){
fopen($filepath_s,?'w');
@chmod($filepath_s,?0777);
ReIndex();
}else{
//?do?nothing
}
db_close();
$empire=null;
?