好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

phpcms无法读取index.html的解决办法(Action does not e

打开网站提示 Action does not exist. 是程序无法读取index.html的原因,但后来修改伪静态规则后,还是不行-,-现在就补充一下如何解决这个问题

在翻论坛的时候,找到一篇需要修改首页生成shtml的帖子。之后我把首页生成文件改成"index.htm",后台生成首页后,可直接访问······单独创建[index.html文件直接读取绝对地址,依然提示[Action does not exist.]这就让我很蛋疼了,不知道是我修改了哪地方导致的这问题······

对下面的目录文件进行修改:

复制代码

代码如下:


\phpcms\modules\content\classes\html.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"。

查看更多关于phpcms无法读取index.html的解决办法(Action does not e的详细内容...

  阅读:76次