yield and Generator of php and its application

yield and Generator of php and its application Reference resources When viewing the laravel source code, you can see the following code vendor\laravel\framework\src\Illuminate\Container\Container.php public function tagged($tag) { if (! isset($this->tags[$tag])) { return []; ...

Added by nomanoma on Sun, 19 Jan 2020 10:04:29 +0200

LAMP architecture (PHP5 installation, PHP7 installation)

PHP5 Installation download wget http://cn2.php.net/distributions/php-5.6.32.tar.bz2 decompression Tip: Can't exec: No file or directory The reason is that the bzip2 package is missing yum install -y bzip2 decompression tar -jxvf php-5.6.32.tar.bz2 To configure 1. Need to be installed first xml2 yum install -y libxml2-devel 2 Install ...

Added by gigantorTRON on Sat, 18 Jan 2020 19:54:04 +0200

LNMP dynamic website

LNMP Basics What is LNMP One of the mainstream enterprise website platforms 50: Linux operating system N:Nginx website service software M:MySQL.MariaDB database P: Website development language (PHP.Perl.Python) Difference between static website and dynamic website Static web page: (1) Static w ...

Added by filteredhigh on Sat, 11 Jan 2020 11:42:19 +0200

Excerpt of wechat payment refund exception

Wechat payment refund API address: https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_4&index=6 Precautions: Total fee: must be the payment amount of the order, unit: minute; Refund fee: less than the order payment amount, unit: minute; Multiple refunds can be initiated for the same order, and the out \; Use a merchant re ...

Added by Daguse on Mon, 06 Jan 2020 21:58:48 +0200

JavaScript Design Mode-Factory Mode

Author| Jeskson Excavation| https://juejin.im/user/5a16e1f3f265da43128096cb What is factory mode? The scene goes to buy dumplings for you to eat, order directly instead of making your own. The restaurant makes dumplings (dumpling process) and sells them directly to customers. class Product{ constructor(name) { this.name = name } init() { ...

Added by pck76 on Mon, 06 Jan 2020 14:27:27 +0200

[PHP] php as the client of websocket reads the push log file in real time

First, you need to use composer to download a third-party extension to realize the websocket client of php. You can directly generate the composer.json file in the current directorycomposer require textalk/websocket require('vendor/autoload.php'); use WebSocket\Client; $client = new Client("ws://echo.websocket.org/"); $client->send("He ...

Added by clodagh2000 on Mon, 06 Jan 2020 05:32:20 +0200

Basic configuration of WeChat public address

Today, I configured the token in the afternoon, but I don't know what's wrong. I found many methods on the Internet and didn't solve the problem, but I finally found a solution in a forum. I'm really excited. Don't say no more. Just connect the code. This is the configuration of wechat public platform.    The url value here should be directly ...

Added by jokerfool on Sun, 05 Jan 2020 19:17:44 +0200

Download songs on cool dog music

After testing, you can download the songs you want to pay to download   Preparation: Python 3.5 + pycharm Libraries used: requests, re, json   Steps: Open the official website of cool dog music, enter the songs you want to search (such as "Tian Tian"), and then press enter to search to get the following page:   Right click to check o ...

Added by ultrus on Sun, 05 Jan 2020 01:21:51 +0200

Do not turn on the automatic serialization option of php redis extension

php redis extension has the option of automatic serialization. When storing kv data, you can open it with less code, and suddenly find a depressing place in the process of use. The extension does not make type judgment on the value you want to store. Any type of value is automatically serialized, such as the following code $rd = new Redis(); $ ...

Added by badal on Sat, 04 Jan 2020 10:04:25 +0200

[thinkphp5 operation redis series tutorial] pconnect (or popen) connection

1.pconnect /** * Connects to a Redis instance or reuse a connection already established with pconnect/popen. * * The connection will not be closed on close or end of request until the php process ends. * So be patient on to many open FD's (specially on redis server side) when using persistent connection ...

Added by smith.james0 on Thu, 02 Jan 2020 11:10:13 +0200