Introduction to LAMP architecture and MySQL binary package installation

Introduction to LAMP architecture Linux + Apache(httpd) + MySQL + PHP PHP website (Google, Taobao, Baidu) Three roles can be in one machine or separated (httpd and PHP need to be together) httpd, PHP, MySQL working diagram It is a "dynamic" request process for PHP to read data from MySQL. MySQL/Mariadb introduction MySQL is a rela ...

Posted on Tue, 10 Dec 2019 17:37:35 -0500 by medusa1414

php uses curl to simulate multithreading to send requests

The execution of each PHP file is single threaded, but PHP itself can use some other technologies to achieve multi-threaded concurrency, such as using PHP FPM process, where curl is used to simulate multi-threaded request sending. PHP's curl multithreading is to obtain the content by calling curl multi exec continuously. Here is a demo to simul ...

Posted on Tue, 10 Dec 2019 13:46:51 -0500 by mevasquez

PHP ID generator based on snowflake algorithm

Snowflake is an ID generation algorithm in Twitter. It can generate unique ID numbers in large-scale distributed situation by some simple rules. It consists of: The first bit is the unused symbol bit. The second part is composed of 41 bit time stamp (MS), whose value is the offset of the current time relative to a certain time. The five bit s ...

Posted on Tue, 10 Dec 2019 13:28:56 -0500 by austingecko

Thinkephp6 installation error, composer install tp6 error Parse error: syntax error

Parse error: syntax error, unexpected ':', expecting '{' in vendor \ topthink \ think helper \ SRC \ helper.php on line 233 Execute install statement composer create-project topthink/think tp The reason is that the version of php is wrong. Official document ThinkPHP 6.0 The environmental requirements are as follows: PHP >= 7.1.0 ...

Posted on Tue, 10 Dec 2019 10:58:05 -0500 by lar5

memcached syntax, data import / export, php connection, session storage

Source: https://blog.csdn.net/Powerful_Fy Memcached storage data syntax Syntax: <command name> <key> <flags> <exptime> <bytes> <data block> Parameter Description: < command name > can be set, add, replace set indicates that the data is stored according to the corresponding < key >. If not, it wil ...

Posted on Tue, 10 Dec 2019 05:53:24 -0500 by VenusJ

Example of wechat scanning payment written in PHP native code

A PHP native code written wechat scanning payment, not based on any framework, completely handwritten. Scan payment is OK as long as the authorized domain name is right. It cannot be tested locally. It has nothing to do with openid, so it has nothing to do with the payment authorization directory page. Wechat merchant information configurati ...

Posted on Mon, 09 Dec 2019 23:40:35 -0500 by superhaggis

Docker installation deployment RabbitMQ, PHP installation extension AMQP and testing

I. using Docker to install and deploy RabbitMQ 1,docker search rabbitmq:management 2,docker pull rabbitmq:management Note: if there is no management after docker pull rabbitmq, the management interface cannot be opened after rabbitmq is started, so we need to download rabbitmq with management plug-in 3. Create shell script of rabbitmq conta ...

Posted on Mon, 09 Dec 2019 19:02:06 -0500 by anne

The front-end h5 file slices are uploaded, and the back-end php receives the slices and merges them

After reading a lot of articles uploaded by slicing files on the Internet, I finally summed up the following ideas: 1. Functions to be realized Front end multi file upload Slice the front-end file and name uuid File synchronous upload, slice synchronous upload Back end accepts slice and saves to folder according to file name Back end judge whe ...

Posted on Mon, 09 Dec 2019 17:05:47 -0500 by etrooper

PHP, SPL (PHP Standard Library)

What is spl library? SPL is a set of interfaces and classes used to solve typical problems. This extension can only be used after php 5.0. Since PHP 5.3.0 is no longer closed, it will remain valid and become a part of the php kernel component. SPL provides a set of standard data structures.   II. How to use SPL? Two way linked listThe double li ...

Posted on Mon, 09 Dec 2019 12:29:45 -0500 by s1yman

Python implementation of a line count tool

We often want to count the number of lines of code in a project, but it may not be so simple if we want to complete the statistics function. Today, let's take a look at how to use python to implement a code line statistics tool. Idea: first get all the files, then count the lines of the code in each file, and finally add the lines Implemented f ...

Posted on Mon, 09 Dec 2019 10:33:55 -0500 by eddy556