欢迎来到工商注册核名查询系统!

phpcms

当前位置:主页 > CMS教程 > phpcms >

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

来源:本站原创|时间:2022-11-25|栏目:phpcms|

在翻论坛的时候,找到一篇需要修改首页生成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

您可能感兴趣的文章

阅读排行

本栏相关

随机阅读

网页制作CMS教程网络编程软件编程脚本语言数据库服务器

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:835971066 | 邮箱:835971066#qq.com(#换成@)

Copyright © 2002-2020 工商注册核名查询系统 版权所有