問(wèn)題:我正常安裝了CmsTop,而且也發(fā)布了信息內(nèi)容,生成首頁(yè),但是為什么訪問(wèn)首頁(yè)是空白的?
回答:這個(gè)問(wèn)題其實(shí)很簡(jiǎn)單,因?yàn)镃msTop的默認(rèn)首頁(yè)并不是我們平常用到的index.html,而是index.shtml,很多朋友的Apache并沒(méi)有將index.shtml配置成默認(rèn)首頁(yè),導(dǎo)致直接訪問(wèn)了index.php頁(yè)面,并沒(méi)有跳轉(zhuǎn)到正常的shtml頁(yè)面上。只需要在Apache上配置一下就可以了。
或者修改一下index.php的代碼:
將原來(lái)的:
PHP Code復(fù)制內(nèi)容到剪貼板
- <?php
- if (!file_exists('./cmstop/data/install.lock'))
- {
- header('Location:./install');
- }
修改為:
PHP Code復(fù)制內(nèi)容到剪貼板
- <?php if (!file_exists('./cmstop/data/install.lock'))
- {
- header('Location:./install');
- }
- else if(file_exists('./index.shtml')) {
- header('Location:./index.shtml');
- } else {
- echo '首頁(yè)未生成 請(qǐng)到后臺(tái)內(nèi)容列表右側(cè)下拉菜單中生成首頁(yè)!';
- }
