免费吧BBS

法国chez空间搭建的FluxBB论坛。

您尚未登录。

#1 2025-12-25 14:16:29

admin
管理员
注册时间: 2025-12-19
帖子: 13

发帖错误修复

找到文件/include/functions.php

将如下函数:

function generate_stopwords_cache_id()

替换为:

function generate_stopwords_cache_id()
{
    $base = PUN_ROOT.'lang/';
    $hash = array();

    if (!is_dir($base))
        return 'cache_id_error';

    $langs = scandir($base);
    if ($langs === false)
        return 'cache_id_error';

    foreach ($langs as $lang) {
        if ($lang == '.' || $lang == '..')
            continue;

        $file = $base.$lang.'/stopwords.txt';
        if (is_file($file)) {
            $hash[] = $file;
            $hash[] = filemtime($file);
        }
    }

    if (empty($hash))
        return 'cache_id_error';

    return sha1(implode('|', $hash));
}

pic.php?.jpg

离线

#2 2025-12-25 14:33:19

admin
管理员
注册时间: 2025-12-19
帖子: 13

Re: 发帖错误修复

这个论坛问题很多


pic.php?.jpg

离线

#3 2026-02-23 19:03:46

admin
管理员
注册时间: 2025-12-19
帖子: 13

Re: 发帖错误修复

谢谢分享


pic.php?.jpg

离线

页脚