問題:我正常安裝了CmsTop,而且也發(fā)布了信息內(nèi)容,生成首頁,但是為什么訪問首頁是空白的?
回答:這個問題其實很簡單,因為CmsTop的默認首頁并不是我們平常用到的index.html,而是index.shtml,很多朋友的Apache并沒有將index.shtml配置成默認首頁,導(dǎo)致直接訪問了index.php頁面,并沒有跳轉(zhuǎn)到正常的shtml頁面上。只需要在Apache上配置一下就可以了。
或者修改一下index.php的代碼:
將原來的:
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 '首頁未生成 請到后臺內(nèi)容列表右側(cè)下拉菜單中生成首頁!';
- }