PHP multiprocess processing tcp connection

<?php if(($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0) { echo "failed to create socket: ".socket_strerror($sock)."n"; exit(); } if(($ret = socket_bind($sock,'127.0.0.1', 8888)) < 0) { echo "failed to bind socket: ".socket_strerror($ret)."n"; exit(); } if( ( $ret = socket_listen( ...

Posted on Thu, 28 May 2020 10:07:18 -0400 by jay7981

Installation and verification of JWT Auth in laravel (example)

Installation and verification of JWT Auth in laravel   1. Use composer to install jwt, cmd to the project folder; Composer require tymon / JWT auth 1.0. * (here the version number is written according to your own needs) Install jwt, refer to official documentation https://jwt-auth.readthedocs.io/en/docs/laravel-installation/ 2. If the laravel v ...

Posted on Thu, 28 May 2020 08:48:45 -0400 by bacarudaguy

php form form concept

The input field mark introduced by PHP form element < input > Input field flag < input > The input field tag < input > is one of the most commonly used tags in forms. Common input field markers < input > include text box, button, radio button, check box, etc. type attribute values and examples and descriptions: 1. text e ...

Posted on Fri, 22 May 2020 00:53:02 -0400 by farsighted

PHP implementation of data structure and algorithm queue and stack

1, Queues 1) Queue is a first in first out (FIFO) linear table. It only allows deletion at the front end of the table and insertion at the back end of the table. The end of the insertion is called the end of the queue, and the end of the deletion is called the head of the queue. That is to say, the team can only enter from the end of the team, ...

Posted on Tue, 19 May 2020 04:14:52 -0400 by mgmoses

qq third party login code tears

In the past, the project asked me to add a third party to log in. In order to avoid trouble, I will fill in the main steps this time. Here I use oauth2.0 of the official website, But just now I looked at the Internet. Yesterday on the official website, I said that it seems that the path of using url spell will be stopped, but I still published ...

Posted on Tue, 05 May 2020 09:14:59 -0400 by Shaun13

How to configure and run Flarum forum system in Laravel Valet

Laravel Valet is a minimalist development environment for Mac OS X, but its configuration is different from that of traditional HTTP servers (Apache, Nginx, etc.), which is different from rewriting URL in configuration file. Valet defines URL processing in a modular way in PHP class. Because of the different default directory structures of Flar ...

Posted on Wed, 29 Apr 2020 01:57:27 -0400 by RosieisSweet

Detailed analysis on the application performance of Laravel blog under PHP7.0 and PHP5.6

At present, the version of Homestead virtual machine I installed is 2.1.8: The PHP version pre installed on this version of Homestead is 5.6.15: We use the ab command (the performance testing tool provided by Apache) to test the performance of the Laravel application in this version (take the blog application developed with Laravel as an exa ...

Posted on Fri, 24 Apr 2020 03:59:17 -0400 by Elusid

Fully understand Redis affairs

When it comes to redis transactions, I'm sure many beginners will have a vague understanding and use of it. I think it is the same as the transactions in our common relational databases (mysql, mssql, etc.), and it also supports rollback, but this understanding has entered a misunderstanding. First of all, transactions in relational data are at ...

Posted on Thu, 23 Apr 2020 04:57:40 -0400 by rainbowsntoffee

Some characteristics and usage of PHP7

1.use <?php // PHP before 7 usage use some\namespace\ClassA; use some\namespace\ClassB; use some\namespace\ClassC as C; use function some\namespace\fn_a; use function some\namespace\fn_b; use function some\namespace\fn_c; use const some\namespace\ConstA; use const some\namespace\ConstB; use const some\namespace\ConstC; ...

Posted on Sat, 18 Apr 2020 10:49:37 -0400 by jil

Details of Contracts and Facades of Laravel

Contracts   Contracts actually advocates interface oriented programming to achieve decoupling. And these universal interfaces have been designed for you by Laravel. These are the contracts So how does Laravel know which implementation we need to use? In the default Contracts binding of Laravel, there is such a definition in 'Illuminate/Foundati ...

Posted on Wed, 15 Apr 2020 08:51:24 -0400 by MarCn