Hongmu Notes
Three ways to reverse string in php

Three ways to reverse string in php Language Notes PHP

(For example, given the string "abcd", implement string reversal using PHP): 1. The first method utilizes PHP's built-in `strrev` function for easy implementation: `strrev($str);` 2. Alternatively, split the string into an array and then traverse and concatenate the characters: `function joinStrrev($str...)`
👁 169
PHP file() function

PHP file() function Language Notes PHP

Definition and usage: The `file()` function reads an entire file into an array. Similar to `file_get_contents()`, the difference is that `file()` returns the file as an array. Each element in the array represents a corresponding line from the file, including the newline character. If the operation fails, it returns `false`. Syntax: `file(path, include_path, context...)`
👁 160
PHP 5 String functions

PHP 5 String functions Language Notes PHP

PHP string functions are an integral part of PHP core. No installation is required to use these functions. Function Description addcslashes() Returns a string with a backslash added before the specified character. addslashes() returns a string with backslashes added before predefined characters. bin2hex() Converts a string of ASCII characters to a hexadecimal value. chop() deletes words…
👁 169
php and HTML refresh current page

php and HTML refresh current page Language Notes PHP

PHP and HTML refresh the current page, which will be used many times, so record it! 🔒 Hidden content: You can view echo after logging in "<script language=JavaScript> location.replace(location.href);</script>"; echo 'The server is busy, please&lt…
👁 149
The htmlspecialchars() function filters user input!

The htmlspecialchars() function filters user input! Summary of pitfalls

<?php header("content-type:text/html;charset=utf-8");//Set encoding to solve Chinese garbled characters $string = "ggbiji & 'ggbiji'"; $string1 = htmlspecialcha…
👁 124
config database configuration and database connection

config database configuration and database connection Language Notes mySql

<?php define('DB_NAME', ''); define('DB_USER', ''); define('DB_PASSWORD', ''); define('DB_HOST', 'localhost'); define('DB_CHARSET', 'utf8'); define…
👁 176
PHP uses QQ mailbox to send emails

PHP uses QQ mailbox to send emails Language Notes PHP

Usage method: 1. Introduce the mailbox integration php file https://wwa.lanzoui.com/iHt6Xuqu41g2. Use function: <?php /*Sending email method *@param $to: receiver $title: title $content: email content *@return bool true: sent successfully false: sent...
👁 220
php gets current web page address

php gets current web page address Language Notes PHP

Determine whether it is https/** * Determine whether it is https * @return bool Returns true if it is https; otherwise returns false */ function is_https() { if ( !empty($_SERVER['HTTPS']) && strtolower($_SERVE…
👁 152
Empire cms retrieves columns based on column id

Empire cms retrieves columns based on column id Program Notes Empire cms

Empire cms calls the column list php code based on the column id<?php /******Parameter configuration begins******/ //If the parameters are left blank, all will be called $classid = ""; /******Parameter configuration ends******/ if(empty($classid)){ $where = "isla…
👁 247
Empire CMS fields, add information processing functions in the background

Empire CMS fields, add information processing functions in the background Program Notes Empire cms

Preface: When adding or modifying fields, you can configure the "Backend Addition Information Processing Function," "Backend Modification Information Processing Function," "Frontend Addition Information Processing Function," or "Frontend Modification Information Processing Function." These allow you to specify separate functions for processing field content; this approach is commonly used for models that have special requirements regarding the storage format of field content. Below is a brief explanation of the basic steps for creating and configuring these processing functions: 1. Write the processing function; 2. Copy the function to e/c...
👁 386
1 307 308 309 310 311 315

🔥 Popular articles

Empire CMS smart label call field collection

Empire CMS smart label call field collection Program Notes Empire cms

Collect and classify all fields that support smart tag calls into Empire CMS smart tags: [e:loop={column ID/topic ID, number of items displayed, operation type, only display pictures with titles, additional SQL conditions, display sorting}] Template code content [/e:loop] Calling time: <?=date('m-d',$bqr[newstime])?> <?=dat…
👁 3749
Imperial cms imitation website tutorial corresponding notes

Imperial cms imitation website tutorial corresponding notes Program Notes Empire cms

Hello everyone, welcome to learn the imperial cms imitation website tutorial. I am Hong Mu qq1810216796 QQ exchange group: 9589723231 Imperial cms website installation. Hello everyone, welcome to learn the imperial cms imitation website tutorial. I am Hong Mu qq: 1810216796 qq exchange group: 958972323 Build an imperial program. If you have a server and have built an imperial website on the server, then...
👁 3413
Empire cms7.5 payment upgraded and optimized version of the library sample automatically generates word/PDF documents paid copy download with payment system member center whole site template source code sitemap Baidu push + installation tutorial 014

Empire cms7.5 payment upgraded and optimized version of the library sample automatically generates word/PDF documents paid copy download with payment system member center whole site template source code sitemap Baidu push + installation tutorial 014 Practical Collection empire template

This set of templates has a complete member center on mobile and PC. The member center template is also very good! By the way, there are also corresponding locomotive collection rules! Regarding installation, upload the direct installation version, install it directly, and then restore the data in the background. There is a view more on the mobile phone. If there is a problem, you can copy the view more code in index.js on the PC. If it has not taken effect yet, please check whether the js file renderings are referenced...
👁 2691