安裝了CmsTop,為什么CmsTop的首頁是空白的?

2010-09-09 17:46:50來源:作者:

問題:我正常安裝了CmsTop,而且也發(fā)布了信息內(nèi)容,生成首頁,但是為什么訪問首頁是空白的?

問題:我正常安裝了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)容到剪貼板
  1. <?php  
  2. if (!file_exists('./cmstop/data/install.lock'))  
  3. {  
  4.     header('Location:./install');  
  5. }  

修改為:

PHP Code復(fù)制內(nèi)容到剪貼板
  1. <?php if (!file_exists('./cmstop/data/install.lock'))  
  2. {  
  3. header('Location:./install');  
  4. }  
  5. else if(file_exists('./index.shtml')) {  
  6. header('Location:./index.shtml');  
  7. else {  
  8. echo '首頁未生成 請到后臺內(nèi)容列表右側(cè)下拉菜單中生成首頁!';  
  9. }  

 

 

關(guān)鍵詞:CmsTop

贊助商鏈接: