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...

EmpireCMS retrieves database articles based on an ID.

EmpireCMS retrieves database articles based on an ID. Program Notes Empire cms

Query articles from the `news` table using the provided article ID: $id=(int)$_GET['id']; $r=$empire->fetch1("select * from {$dbtbpre}ecms_news where id=$id"}); $classid=(int)$r['classid']; Backup query code,...
👁 207
EmpireCMS – Batch extract main text content into summary; Summary extraction

EmpireCMS – Batch extract main text content into summary; Summary extraction Program Notes Empire cms

Code: <?php define('EmpireCMSAdmin', '1'); require('../e/class/connect.php'); require('../e/class/db_sql.php'); require('../e/class/functions.php'); //...
👁 202
WordPress Data Migration Empire – Article Migration Code

WordPress Data Migration Empire – Article Migration Code Program Notes Empire cms

Continuing from the code in the previous article; below is the code for redirecting the page: 🔒 Hidden content: Members can view <?php require("../config.php"); $dbname2 = 'www_azhenxi_com'; $dbname = 'ecms_site'; $u = empty($_GET['n'])?0: $_GE...
👁 333
WordPress to EmpireCMS data migration – Category migration code

WordPress to EmpireCMS data migration – Category migration code Program Notes wordpress

config.php🔒 Hidden content: Members can view: <?php define('DB_NAME', 'root'); define('DB_USER', 'root'); define('DB_PASSWORD', 'RspC7M8seHywXZBW'); define('DB_HOST', 'loc...');
👁 242
EmpireCMS retrieves the column name and link for a specified ID.

EmpireCMS retrieves the column name and link for a specified ID. Program Notes Empire cms

1. Calling category name: <?=$class_r[栏目ID]['classname']?&gt;示例:&lt;?=$class_r[1]['classname']?> – This allows the category name with ID 1 to be displayed correctly. 2. Calling category link: <=?=$class_r[Category ID]['cla...
👁 389
The Empire cms addslashes function

The Empire cms addslashes function Program Notes Empire cms

The `addslashes` function in EmpireCMS is a PHP function used to escape special characters within strings. These special characters include single quotes, double quotes, backslashes, and the NULL character. Escaping these characters helps prevent unexpected results or security vulnerabilities when executing SQL queries or other database operations. Below is an example of the `addslashes` function in EmpireCMS: `function addslashes...`
👁 240
Can Sphinx PHP perform a single search for multiple terms at once?

Can Sphinx PHP perform a single search for multiple terms at once? Program Notes sphinx

Yes, Sphinx allows you to search for multiple terms in a single query. You can use multiple keywords in your search query to search for text within an index. For example, here is a simple PHP code snippet that uses the Sphinx API to perform a search across multiple keywords: require_once('sphinxapi.php'); // Connect to the Sphinx server $sphinx = new S...
👁 267
WordPress `update_post_meta` function

WordPress `update_post_meta` function Program Notes wordpress

`update_post_meta()` is a WordPress function used to update custom fields for posts or pages; it is also known as "metadata." Its function prototype is as follows: `update_post_meta(int $post_id, string $meta_key, mixed $meta_value, mixed $prev...)`
👁 198
`get_post_meta` function for WordPress

`get_post_meta` function for WordPress Program Notes wordpress

`get_post_meta()` is a WordPress function used to retrieve custom fields for posts or pages; it is also known as "metadata." Its function prototype is as follows: `get_post_meta(int $post_id, string $key = '',bool $single = false)参数说明:$post_id:...)`
👁 311
WordPress `wp_cache_flush` function

WordPress `wp_cache_flush` function Program Notes wordpress

`wp_cache_flush()` is an built-in WordPress function used to clear all data from the cache. Its function prototype is as follows: `wp_cache_flush()`. When this function is called, all data within the WordPress caching system is deleted, including data stored by `wp_cache_set()` and other types of cached data. `wp_c...`
👁 344
1 5 6 7 8 9 23