• 设为首页
  • 收藏本站
  • 积分充值
  • VIP赞助
  • 手机版
  • 微博
  • 微信
    微信公众号 添加方式:
    1:搜索微信号(888888
    2:扫描左侧二维码
  • 快捷导航
    福建二哥 门户 查看主题

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

    发布者: 浪子 | 发布时间: 2025-7-24 16:14| 查看数: 17| 评论数: 0|帖子模式

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

    来源:互联网
    免责声明:如果侵犯了您的权益,请联系站长(1277306191@qq.com),我们会及时删除侵权内容,谢谢合作!

    最新评论

    浏览过的版块

    QQ Archiver 手机版 小黑屋 福建二哥 ( 闽ICP备2022004717号|闽公网安备35052402000345号 )

    Powered by Discuz! X3.5 © 2001-2023

    快速回复 返回顶部 返回列表