Tag:php

  • Explain the PHP framework easysoole

    Time:2022-6-7

    catalogue install function Edit the composer JSON file Finally, execute composer dumpautoload life cycle Profile description Configure operation class Add user configuration item Separation of production and development configuration Dynamic configuration Service management script File hot load install Installing using composer composer require easyswoole/easyswoole=3.xphp vendor/bin/easyswoole install Launch framework php easyswoole start Nginx forwarding server { […]

  • Summary of RAR decompression and reading extension package in PHP

    Time:2022-6-5

    As the extended learning of compression and decompression, the two ace compression formats RAR and zip have always been the compression terminators in the computer field. Rar compressed packets are nearly dominant in the windows system. The PHP extension we are learning today is aimed at rar compressed packets. However, the RAR extension of PHP […]

  • Analyzing the garbage collection mechanism of PHP

    Time:2022-6-4

    If you have used the C language, the way to apply for memory is malloc or calloc. After you use up the memory, you must not forget to use the free function to release it. This is the legendary manual garbage collection, which is generally used by the sweeping monk. In many high-level languages, you […]

  • Summary of methods for PHP to screen errors

    Time:2022-6-3

    1. @ shielding method @A symbol to suppress errors in PHP. Even if you enable the error reporting function, you can shield the error information by adding the @ symbol before the Error statement. A warning error appears before using @ to suppress errors. 2、error_ Reporting shielding method Before the PHP file starts, we can […]

  • Explain PHP interface signature verification

    Time:2022-6-2

    catalogue overview Common validation One way hash encryption Symmetric encryption Asymmetric encryption Key security management Interface debugging tools Online interface documentation extend Summary overview When designing signature verification, the following points must be met: Variability: each signature must be different. Timeliness: the timeliness of each request. It is invalid after expiration. Uniqueness: each signature is […]

  • Explain PHP to solve the problem of the daemon redis faking death

    Time:2022-6-1

    catalogue 1、 A simple daemon example 2、 An example of a redis resident process that is no longer fake dead (fake alive) 1、 A simple daemon example <?php $redis = new \Redis(); $redis->connect(‘localhost’, 6379); $redis->auth(‘xxxxx’); // If the redis password is not set to an empty string. $redis->select(1); $queueKey = ‘redis_ Queue_ services_ key’; // […]

  • Explain PHP multi process consumption queue

    Time:2022-5-31

    catalogue introduction Nginx process model Process design Process semaphore design PHP installation and repair semaphore Semaphores and system calls Daemon process Command Design Start command Force stop command Force restart command Smooth stop command Smooth restart command View process status introduction Recently, a small function was developed, which used the queue MCQ to start a […]

  • The method of realizing PHP array property by golang

    Time:2022-5-29

    catalogue preface content 1. PHP handles complex structures 2. golang handles complex structures 3. Databox complex structure processing summary preface In our business process, there is a pain point corresponding to the use of strongly typed languages, that is, before using variables, we must define variable types, such as C, c++, golang, etc. weak typed […]

  • Example usage of strval() function in PHP

    Time:2022-5-29

    1. Function description The strval() function is a built-in function in PHP that converts any standard value (string, integer, or double) to a string. We cannot use strval in arrays or objects. If this function is used, it only returns the type name of the value to be converted. 2. Grammar string strval (mixed $var) […]

  • The declare command of PHP and its usage

    Time:2022-5-28

    definition The declare structure in PHP is used to set the execution instructions of a piece of code Declare is used to execute three instructions: ticks, encoding, strict_ Types Scope The declare structure is used in the global scope and affects all subsequent codes(however, if a file with declare structure is included in another file, […]

  • How PHP initializes PDO and original SQL statement operations

    Time:2022-5-27

    catalogue PDO instance DNS parameters PDO object properties Query statement General query and traversal Query result set (array, object) Query result set (class) Query result set (specify field) Add, delete and modify Add operation Modify operation Delete operation summary PDO instance First, let’s take a look at how a PDO instance is initialized. $dns = […]

  • Use of PHP PDO preprocessing statements and transactions

    Time:2022-5-26

    catalogue Preprocessing statement function Transaction capability summary Preprocessing statement function Preprocessing statement is to prepare a statement to be executed, and then return a pdostatement object. Generally, we will use the execute () method of pdostatement object to execute this statement. Why is it called preprocessing? Because it allows us to call this statement multiple […]