phpcms无法读取index.html的解决步骤

代码如下: 
phpcmsmodulescontentclasseshtml.class.php 
查找 

复制代码

代码如下: 
/** 
* 更新首页 
*/ 
public function index() { 
if($this->siteid==1) { 
$file = PHPCMS_PATH.'index.html'; 
//添加到发布点队列 
$this->queue->add_queue('edit','/index.html',$this->siteid); 
} else { 
$site_dir = $this->sitelist[$this->siteid]['dirname']; 
$file = $this->html_root.'/'.$site_dir.'/index.html'; 
//添加到发布点队列 
$this->queue->add_queue('edit',$file,$this->siteid); 
$file = PHPCMS_PATH.$file; 

修改成 

复制代码

代码如下: 
/** 
* 更新首页 
*/ 
public function index() { 
if($this->siteid==1) { 
$file = PHPCMS_PATH.'index.htm'; 
//添加到发布点队列 
$this->queue->add_queue('edit','/index.htm',$this->siteid); 
} else { 
$site_dir = $this->sitelist[$this->siteid]['dirname']; 
$file = $this->html_root.'/'.$site_dir.'/index.html'; 
//添加到发布点队列 
$this->queue->add_queue('edit',$file,$this->siteid); 
$file = PHPCMS_PATH.$file; 

然后重新就OK了。当然你也可以修改成"index,shtml"。

代码如下: 
php $j=1;} 
{loop subcat($catid) $v} 
{php if($v['type']!=0) continue;} 
<div class="box cat-area" {if $j%2==1}style="margin-right:10px"{/if}> 
..... 
{if $j%2==0}<div class="bk10"></div>{/if} 
{$j++} 
{/loop} 
现在假如我要改成一行3个,那么新的代码就是: 

复制代码

代码如下: 
{php $j=1;} 
{loop subcat($catid) $v} 
{php if($v['type']!=0) continue;} 
<div class="box cat-area" {if $j%3==1}style="margin-right:10px"{/if}{if $j%3==2}style="margin-right:10px"{/if}> 
....... 
{if $j%3==0}<div class="bk10"></div>{/if} 
{$j++} 
{/loop} 
下面做出解释: 
①第4行代码:“$j%3==1”代表每行3个box(每个栏目的边框css样式)的第一个,“$j%3==2”就是3个box中间的一个,这两个box都使用了style样式 margin-right:10px的样式,即右外边距10px; 
②第6行代码:这个是每行与每行的边距代码; 
③修改default_blue.css样式表里的box、cat-area,修改边框的宽度及颜色等自定义样式。

原文地址:https://www.cnblogs.com/2881064178dinfeng/p/6233650.html