当前位置:首页>电子书资讯>python 项目: 电子书多余回车智能去除工具

python 项目: 电子书多余回车智能去除工具

  • 2026-03-27 22:50:24
python 项目: 电子书多余回车智能去除工具
电子书多余回车去除工具
有些从网页上拷贝下来的陈年古早 txt 电子书 ,会因网页排版等原因,被页面切割出许多不应该有的回车。
py 脚本运行后,提示输入 txt 文件路径(支持手机端 termux),再回车,则智能去掉多余回车。
在电脑上可直接拖入多个 txt 文件或文件夹。
源代码如下:
#!/usr/bin/env python3# -*- coding: utf-8 -*-"""多余回车去除工具功能:去除所有非指定标点后的回车支持拖拽文件和文件夹进行批量处理,直接覆盖原文件兼容Termux等移动端环境"""import reimport osimport sysimport tempfileimport shutilimport chardetimport timedef detect_file_encoding(file_path):    """    检测文件编码    使用chardet库检测编码,然后尝试读取    返回编码和文件内容    """    try:        # 先读取二进制数据        with open(file_path, 'rb'as f:            raw_data = f.read()        if not raw_data:            return None""        # 检测编码        result = chardet.detect(raw_data)        detected_encoding = result['encoding']        confidence = result['confidence']        # 常见的编码映射        encoding_map = {            'ascii''utf-8',  # ASCII是UTF-8的子集            'gb2312''gbk',   # gb2312是gbk的子集            'iso-8859-1''gbk',  # 常见于中文Windows            'windows-1252''gbk',  # 常见于中文Windows        }        # 如果检测到的编码是None,则使用默认编码        if detected_encoding is None:            detected_encoding = 'utf-8'        # 如果有映射,则使用映射后的编码        detected_encoding = encoding_map.get(detected_encoding.lower(), detected_encoding)        # 如果置信度较低,则尝试常见的中文编码        if confidence < 0.7:            for encoding in ['utf-8-sig''utf-8''gbk''gb2312''gb18030']:                try:                    return encoding, raw_data.decode(encoding)                except:                    continue        # 使用检测到的编码尝试解码        try:            return detected_encoding, raw_data.decode(detected_encoding, errors='ignore')        except:            # 如果检测到的编码失败,则尝试常见编码            for encoding in ['utf-8-sig''utf-8''gbk''gb2312''gb18030']:                try:                    return encoding, raw_data.decode(encoding)                except:                    continue        # 如果所有编码都失败,则使用utf-8忽略错误        return 'utf-8', raw_data.decode('utf-8', errors='ignore')    except Exception as e:        print(f"编码检测错误: {file_path} - {e}")        return NoneNonedef remove_extra_newlines(text):    """    移除所有非指定标点后的回车    保留回车的情况:前面是中文句号(。)、感叹号(!)、问号(?)、省略号(……)                  中文引号(「」『』"")、中文单引号(「」『')    其他情况下的回车全部移除    """    # 定义需要保留回车的标点    # 包括:中文句号、感叹号、问号、省略号、各种引号    keep_punctuation = r'[。!?…·「」『』""\'\']'    # 处理省略号,可能是三个点或六个点    # 先将连续的...或……替换为特殊标记    text = re.sub(r'…{1,}''…', text)  # 标准化省略号    text = re.sub(r'\.{3,}''…', text)  # 将英文省略号转换为中文省略号    # 匹配所有回车,但前面是指定标点的不处理    # 使用负向回顾断言,匹配前面不是指定标点的回车    pattern = rf'(?<!{keep_punctuation})\n'    # 替换所有匹配的回车为空字符串    result = re.sub(pattern, '', text)    return resultdef write_file_with_fallback(file_path, content, original_encoding):    """    使用回退策略写入文件    1. 先尝试用原编码写入    2. 如果失败,尝试用UTF-8写入    3. 如果还失败,尝试用UTF-8并忽略错误    """    temp_path = None    try:        # 创建临时文件        temp_file = tempfile.NamedTemporaryFile(            mode='wb',  # 使用二进制模式写入            delete=False,            suffix='.tmp',            dir=os.path.dirname(file_path)  # 在同目录创建临时文件        )        temp_path = temp_file.name        temp_file.close()        # 策略1: 先尝试用原编码写入        try:            with open(temp_path, 'w', encoding=original_encoding, errors='strict'as f:                f.write(content)            return temp_path, original_encoding, True        except UnicodeEncodeError as e1:            # 策略2: 如果原编码失败,尝试UTF-8            try:                with open(temp_path, 'w', encoding='utf-8', errors='strict'as f:                    f.write(content)                return temp_path, 'utf-8'True            except UnicodeEncodeError as e2:                # 策略3: 如果UTF-8也失败,使用忽略错误的方式                with open(temp_path, 'w', encoding='utf-8', errors='ignore'as f:                    f.write(content)                return temp_path, 'utf-8'True        except Exception as e:            return NoneNoneFalse    except Exception as e:        # 如果出错,尝试删除临时文件        if temp_path and os.path.exists(temp_path):            try:                os.unlink(temp_path)            except:                pass        return NoneNoneFalsedef process_file(file_path, file_index=None, total_files=None):    """处理单个文件,直接覆盖原文件"""    # 显示进度    if file_index is not None and total_files is not None:        print(f"\r正在处理文件 [{file_index}/{total_files}]: {os.path.basename(file_path)}", end="", flush=True)    # 检查文件是否存在    if not os.path.exists(file_path):        if file_index is not None and total_files is not None:            print()  # 换行        return f"文件不存在: {file_path}"    # 检查是否是txt文件    if not file_path.lower().endswith('.txt'):        if file_index is not None and total_files is not None:            print()  # 换行        return f"跳过非txt文件: {file_path}"    # 获取文件大小    file_size = os.path.getsize(file_path)    if file_size == 0:        if file_index is not None and total_files is not None:            print()  # 换行        return f"跳过空文件: {file_path}"    if file_size > 10 * 1024 * 1024:  # 大于10MB的文件        if file_index is not None and total_files is not None:            print()  # 换行        confirm = input(f"警告: 文件 {os.path.basename(file_path)} 大小超过10MB,处理可能较慢。继续吗?(y/N): ").strip().lower()        if confirm != 'y':            return f"已跳过大文件: {file_path}"    # 检测文件编码并读取内容    encoding, content = detect_file_encoding(file_path)    if content is None or encoding is None:        if file_index is not None and total_files is not None:            print()  # 换行        return f"无法解码文件: {file_path}"    # 处理多余回车    try:        new_content = remove_extra_newlines(content)    except Exception as e:        if file_index is not None and total_files is not None:            print()  # 换行        return f"处理文本时出错: {file_path} - {e}"    # 如果内容没有变化,则跳过    if new_content == content:        if file_index is not None and total_files is not None:            print()  # 换行        return f"无需处理: {file_path}"    # 使用回退策略写入文件    temp_path, used_encoding, success = write_file_with_fallback(file_path, new_content, encoding)    if not success or temp_path is None:        if file_index is not None and total_files is not None:            print()  # 换行        return f"写入文件时出错: {file_path} - 无法创建临时文件"    try:        # 备份原文件        backup_path = file_path + '.bak'        try:            shutil.copy2(file_path, backup_path)        except:            pass  # 如果备份失败,继续处理        # 用临时文件替换原文件        shutil.move(temp_path, file_path)        if file_index is not None and total_files is not None:            print()  # 换行        encoding_info = ""        if used_encoding != encoding:            encoding_info = f" (编码从{encoding}改为{used_encoding})"        return f"处理完成: {file_path}{encoding_info}"    except Exception as e:        # 如果出错,尝试删除临时文件        if temp_path and os.path.exists(temp_path):            try:                os.unlink(temp_path)            except:                pass        if file_index is not None and total_files is not None:            print()  # 换行        return f"替换文件时出错: {file_path} - {e}"    finally:        # 确保临时文件被删除        if temp_path and os.path.exists(temp_path):            try:                os.unlink(temp_path)            except:                passdef process_path(path, show_progress=True):    """处理路径,可能是文件或文件夹"""    results = []    if os.path.isfile(path):        # 如果是文件,直接处理        result = process_file(path)        results.append(result)    elif os.path.isdir(path):        # 如果是文件夹,递归处理所有txt文件        all_files = []        for root, dirs, files in os.walk(path):            for file in files:                if file.lower().endswith('.txt'):                    file_path = os.path.join(root, file)                    all_files.append(file_path)        total_files = len(all_files)        if total_files == 0:            return ["文件夹中没有txt文件"]        if show_progress:            print(f"找到 {total_files} 个txt文件")        for i, file_path in enumerate(all_files, 1):            if show_progress:                result = process_file(file_path, i, total_files)            else:                result = process_file(file_path)            results.append(result)            # 每处理10个文件显示一次进度            if show_progress and i % 10 == 0:                print(f"已处理 {i}/{total_files} 个文件")    else:        results.append(f"路径不存在: {path}")    return resultsdef interactive_mode():    """交互式模式"""    print("多余回车去除工具 (直接覆盖原文件)")    print("-" * 40)    print("规则:只保留指定标点后的回车")    print("指定标点包括:。!?……「」『'\"")    print("-" * 40)    while True:        print("\n请选择操作:")        print("1. 处理单个文件")        print("2. 处理文件夹")        print("3. 退出")        choice = input("请输入选项 (1/2/3): ").strip()        if choice == "1":            file_path = input("请输入txt文件路径: ").strip()            if not file_path:                print("路径不能为空。")                continue            # 处理文件            result = process_file(file_path)            print(result)        elif choice == "2":            dir_path = input("请输入文件夹路径: ").strip()            if not dir_path:                print("路径不能为空。")                continue            if not os.path.isdir(dir_path):                print("路径不是有效的文件夹。")                continue            # 确认            confirm = input("警告:这将覆盖文件夹内所有txt文件,是否继续?(y/N): ").strip().lower()            if confirm != 'y':                print("已取消操作。")                continue            # 处理文件夹            print(f"开始处理文件夹: {dir_path}")            start_time = time.time()            results = process_path(dir_path, show_progress=True)            end_time = time.time()            # 显示统计信息            success_count = len([r for r in results if '处理完成' in r])            skip_count = len([r for r in results if '跳过' in r])            no_change_count = len([r for r in results if '无需处理' in r])            error_count = len([r for r in results if '出错' in r])            print(f"\n处理完成,用时 {end_time-start_time:.2f} 秒")            print(f"共找到 {len(results)} 个文件:")            print(f"  ✓ 成功处理: {success_count}")            print(f"  ○ 无需处理: {no_change_count}")            print(f"  - 跳过: {skip_count}")            print(f"  ✗ 错误: {error_count}")            if error_count > 0:                print("\n错误详情:")                for result in results:                    if '出错' in result or '无法解码' in result:                        print(f"  ✗ {result}")        elif choice == "3":            print("退出程序。")            break        else:            print("无效选项,请重新输入。")def batch_mode():    """批量处理模式(通过命令行参数)"""    print("多余回车去除工具 - 批量处理模式 (直接覆盖原文件)")    print("-" * 50)    print("规则:只保留指定标点后的回车")    print("指定标点包括:。!?……「」『'\"")    print("-" * 50)    # 获取所有命令行参数(跳过脚本名本身)    paths = sys.argv[1:]    if not paths:        print("没有提供文件或文件夹路径。")        return    # 确认是否继续    if len(paths) > 1 or (len(paths) == 1 and os.path.isfile(paths[0])):        confirm = input("警告:这将直接覆盖原文件,是否继续?(y/N): ").strip().lower()        if confirm != 'y':            print("已取消操作。")            if sys.platform == "win32":                input("按回车键退出...")            return    all_results = []    start_time = time.time()    for i, path in enumerate(paths, 1):        # 如果路径被引号包裹,去除引号        path = path.strip('"\'')        print(f"\n处理路径 {i}/{len(paths)}{path}")        results = process_path(path, show_progress=True)        all_results.extend(results)    end_time = time.time()    # 统计和显示结果    success_count = len([r for r in all_results if '处理完成' in r])    skip_count = len([r for r in all_results if '跳过' in r])    no_change_count = len([r for r in all_results if '无需处理' in r])    error_count = len([r for r in all_results if '出错' in r or '无法解码' in r])    print(f"\n{'='*50}")    print(f"批量处理完成! 总用时: {end_time-start_time:.2f} 秒")    print(f"成功处理: {success_count} 个文件")    print(f"无需处理: {no_change_count} 个文件")    print(f"跳过: {skip_count} 个非txt文件")    print(f"错误: {error_count} 个")    if error_count > 0:        print("\n错误详情:")        for result in all_results:            if '出错' in result or '无法解码' in result:                print(f"  ✗ {result}")def main():    """    主函数    判断运行模式:    1. 如果有命令行参数,则进入批量处理模式    2. 如果没有参数,则进入交互式模式    """    # 检查是否有命令行参数(除了脚本名)    if len(sys.argv) > 1:        # 批量处理模式        batch_mode()        # 在Windows下,如果是双击运行或拖拽运行,保持打开窗口        if sys.platform == "win32":            input("\n按回车键退出...")    else:        # 交互式模式        interactive_mode()if __name__ == "__main__":    main()

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-03 14:09:07 HTTP/2.0 GET : https://g.15386.cn/a/464476.html
  2. 运行时间 : 0.111817s [ 吞吐率:8.94req/s ] 内存消耗:4,357.68kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=d1a0e0d251a9fc899b7a0b1a2cc6edee
  1. /yingpanguazai/ssd/ssd1/www/g.15386.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/g.15386.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/g.15386.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/g.15386.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/g.15386.cn/runtime/temp/bdb8e09c175b3f3cfe6785832a6c88dd.php ( 12.06 KB )
  140. /yingpanguazai/ssd/ssd1/www/g.15386.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000499s ] mysql:host=127.0.0.1;port=3306;dbname=g_15386;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000627s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.001242s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.001631s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000613s ]
  6. SELECT * FROM `set` [ RunTime:0.000266s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000574s ]
  8. SELECT * FROM `article` WHERE `id` = 464476 LIMIT 1 [ RunTime:0.006589s ]
  9. UPDATE `article` SET `lasttime` = 1775196547 WHERE `id` = 464476 [ RunTime:0.016828s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.006873s ]
  11. SELECT * FROM `article` WHERE `id` < 464476 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000771s ]
  12. SELECT * FROM `article` WHERE `id` > 464476 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000592s ]
  13. SELECT * FROM `article` WHERE `id` < 464476 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002743s ]
  14. SELECT * FROM `article` WHERE `id` < 464476 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002550s ]
  15. SELECT * FROM `article` WHERE `id` < 464476 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002918s ]
0.113328s