Hongmu Notes
Home Program Notes

Program Notes

In the final analysis, programmers taking notes is an efficient behavior of recording work experience. It can not only record the various technical problems encountered in the process of program development, but also record the beneficial experiences gained in learning technical knowledge. It can both help...

A single database record for WordPress operations

A single database record for WordPress operations Program Notes wordpress

I'm documenting my code – its primary function is to handle WordPress database connections and operations. Since I might need this again in the future, I've decided to record it here; this way, when I need to use it next time, I can simply copy and paste it. As it turns out, taking notes can really save some time! First code snippet: "`php // Include the WordPress core file: require_once(dirname(__FILE__));" `
👁 173
PHP script for automatically refreshing the Empire Tag page

PHP script for automatically refreshing the Empire Tag page Program Notes Empire cms

I wrote a PHP script to automatically access and refresh the Empire Tag page; it's not particularly useful right now, but might come in handy in the future... Just place the code in the `/e/tags` directory and access it – you may need to make appropriate modifications to the URL links in the code. Combining this with a caching mechanism will yield excellent results. <?php require('../class/connect.php '); require('../class/...');
👁 253
Empire cms multi-condition query IN query

Empire cms multi-condition query IN query Program Notes Empire cms

In Empire CMS, I occasionally need to use in query, which is a multi-condition query: When using this, I found that the IN query could not find my results, so I searched the PHP code and found that the following function needs to be modified! function SearchDoKeyboard($f,$hh,$keyboard){ // print_r($keyboard);echo…
👁 224
Assign the result of a multiple-selection form submission to a hidden form in EmpireCMS.

Assign the result of a multiple-selection form submission to a hidden form in EmpireCMS. Program Notes Empire cms

In EmpireCMS, if you need to implement a multiple-selection feature—such as a multi-region search—you must concatenate all the forms generated after the multi-region selection and then pass them to the `keyboard` field. For this purpose, the following code can be used: HTML code snippet: <label class="area-box-listhover"> <input class="inputcheckb...>
👁 166
Empire cms limits the input multi-selection in the specified box in the form to single selection

Empire cms limits the input multi-selection in the specified box in the form to single selection Program Notes Empire cms

In Empire CMS, when performing a search, the form name can only be set to "keyboard"; therefore, when conducting a multi-condition search with multiple search fields, the single-select field may encounter issues. As a result, an alternative approach must be adopted to resolve this issue. The HTML code is as follows: <label class="area-box-listhover"> <input class="input...>
👁 172
After clicking to submit the form in Empire CMS, use js to combine the URL and redirect it

After clicking to submit the form in Empire CMS, use js to combine the URL and redirect it Program Notes Empire cms Language Notes JavaScript

Many times, the search link is too long and carries many parameters. We want to make pseudo-static modifications and also hope that the link can be accessed a second time. Original html code: 🔒 Hidden content: You can view it after logging in &lt;form class="form-search" id="q-form" method="get"&gt; &lt;div class="input-…
👁 304
Empire CMS Related Search Functionality Extension (implemented using Baidu)

Empire CMS Related Search Functionality Extension (implemented using Baidu) Program Notes Empire cms

For example, retrieve a set of relevant keywords based on the title, then activate the search function; clicking on this will redirect you to the EmpireCMS search page – provided that your EmpireCMS search functionality has been enhanced to support fuzzy search! PHP code to fetch Baidu dropdown suggestions 🔒 Hidden content: Members can view the function `function getBaiduSuggestion($title) { $title = urlencode($title);}`
👁 326
EmpireCMS search functionality – POST and GET parameters

EmpireCMS search functionality – POST and GET parameters Program Notes Empire cms

Example of variable name explanation: Search Form Submission URL – POST method: /e/search/index.php <form name= "searchform" method= "post" action= "/e/search/index.php"> – GET method: /e/search/?searchget=1/e/searc...
👁 380
pbootcms sqlite database converted to mysql database

pbootcms sqlite database converted to mysql database Program Notes PbootCms

Why convert to mysql database? When the amount of data in the database reaches tens of thousands, there will be the following differences between using SQLite and MySQL: Performance: SQLite is an embedded database suitable for lightweight applications. It uses disk files to store data and has only one connection. In contrast, MySQL is a complete client/server relational database management system that supports multiple connections and has...
👁 624
Troubleshooting errors when installing Xunsearch on CentOS 8.0

Troubleshooting errors when installing Xunsearch on CentOS 8.0 Program Notes sphinx

报错内容:sh setup.sh +==========================================+ | Welcome to setup xunsearch(full) | | 欢迎使用 xunsearch (完整版) 安装程序 | +--------------------...
👁 960
1 4 5 6 7 8 23