Hongmu Notes
Home Language Notes

Language Notes

python cooperates with winrar to specify folders and package in batches

python cooperates with winrar to specify folders and package in batches Language Notes python

I recently tinkered with it and it works pretty well. Make a backup. So that you can’t find it next time. #!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import re import subprocess import os import sys from pathlib i…
👁 53
Practical Guide to Handling Prohibited Keywords in Website Advertising: Python-based Scanning + Baota Firewall Filtering + Keyword Database Management

Practical Guide to Handling Prohibited Keywords in Website Advertising: Python-based Scanning + Baota Firewall Filtering + Keyword Database Management Language Notes PHP PHP and mysql

Practical Guide to Handling Prohibited Keywords in Website Advertising: Python Scanning + Baota Firewall Filtering + Keyword Database Management. Author: Hongmu (QQ: 1810216796). First published on Hongmu Notes – GitHub: https://github.com/1810216796 (Full source code). 📌 Background: Recently, we received feedback from a client stating that their website contained prohibited advertising keywords – such as "First," "Best," and "National-Level" – which violated advertising regulations...
👁 106
PHP: Delete all files and folders in the current directory.

PHP: Delete all files and folders in the current directory. Language Notes PHP

The following is a secure PHP script designed to scan and delete all files and folders within the current working directory (excluding the script itself, unless otherwise specified). The script includes an interactive confirmation prompt to prevent accidental deletion. <?php /** * recursively delete all contents from a directory (excluding the directory itself) * * @param string $dir Path to the directory to be cleaned * @param...
👁 116
PHP – Output a website directory tree structure; Directory Tree Browser – Securely displays the tree structure of a specified folder.

PHP – Output a website directory tree structure; Directory Tree Browser – Securely displays the tree structure of a specified folder. Language Notes PHP

Directory Tree Browser – Securely displays the tree structure of a specified folder. How to use: 1. Place this file in the website's root directory and name it `tree.php` or any other name of your choice. 2. Modify the `TARGET_BASE` constant below to specify the root folder you wish to browse (relative to the website's root directory). 3. Access the page via your browser at: `http://yourwebsite/tree.php`. 4. Optional parameters: `?di...`
👁 170
A simple website backend using PHP + HTML.

A simple website backend using PHP + HTML. Language Notes PHP

后台代码:&lt;?php session_start(); // ============================ // 配置文件设置 // ============================ // 配置文件路径 $config_file = './config.php'; // 默...
👁 133
Batch add header configuration to PHP files

Batch add header configuration to PHP files Language Notes PHP

User-friendly &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;
👁 107
Batch rename HTML files to PHP files

Batch rename HTML files to PHP files Language Notes PHP

User-friendly and highly recommended. <?php // Security note: It is advisable to run this script in a test environment first and back up important files. echo '<h3>Batch renaming of HTML files to PHP</h3>'; // Check for the presence of a confirmation parameter if (isset($_GET['confirm']) && $_GET['conf...
👁 116
sqlite database online php read operation view, pbootcms database online view

sqlite database online php read operation view, pbootcms database online view Program Notes PbootCms Language Notes PHP

When using pbootcms, a database is often used, but the database of pb is a .db file, so it is very troublesome. There is no ready-made visualization page to view the database, so a php visualization page for php online viewing is developed here. This will be much more convenient. How to use? In the folder of the db file, create a php, put the following code in it, modify your database name, and then access p...
👁 167
Found a really nice 404 page!

Found a really nice 404 page! Language Notes CSS JavaScript

Display effect. Code: <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width...>
👁 144
I've written an HTML file for office document processing, designed to handle the segmentation of AI-generated office texts.

I've written an HTML file for office document processing, designed to handle the segmentation of AI-generated office texts. Language Notes CSS Summary of pitfalls

I've written an HTML file for office document processing, designed to handle the segmentation of AI-generated office texts. <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" c...
👁 152
1 2 3 4 33