Use and introduction of Facade
What is the Facade? At present, it is a class that is used to facilitate the static method call of the original class (undefined static method).The specific implementation of Facade is as follows:First look at the core document:\thinkphp\base.php`//Register static proxy of core classFacade::bind([
facade\App::class => App::class,
facade ...
Posted by jsnyder2k on Fri, 06 Dec 2019 09:31:57 -0800
Download progress bar at terminal
programme
<?php
// Refer to https://mengkang.net/1412.html
$width = exec("tput cols");
$progress = "[]100%";
$del = strlen($progress);
$width = $width - $del;
$progress = "[%-{$width}s]%d%%\r";
for($i=1;$i<=$width;$i++){
printf($progress,str_repeat("=",$i),($i/$width)*100);
usleep(30000);
}
echo "\n";
interpretative statement
...
Posted by ZaZall on Fri, 06 Dec 2019 05:30:46 -0800
nextcloud and oauth2 integration tutorial
Basic environment
Nextcloud 15.0.5
oauth2
Install sociallogin
Download in the official app store sociallogin
Extract and copy sociallogin to app directory
Open Nextcloud and enable it in the application
Configure oauth2
Use the administrator account to open Nextcloud to find the sociallogin settings, select Custom OAuth2 and add oauth2 in ...
Posted by apaxson on Thu, 05 Dec 2019 21:30:04 -0800
LNMP architecture introduction, MySQL and PHP installation, Nginx introduction
LNMP architecture introduction
Unlike LAMP, Nginx provides web Services
And php exists as an independent service, which is called php FPM
Nginx processes static requests directly, and dynamic requests are forwarded to PHP FPM
MySQL reinstallation
MySQL is installed by compiling free binary installation package. You need to delete the corre ...
Posted by Jason28 on Thu, 05 Dec 2019 20:56:00 -0800
php operation solr7.5 data imported through mysql
solr installation and configuration
download
Download address: http://www.apache.org/dyn/closer.lua/lucene/solr/7.5.0
Unzip directly after downloading.
To configure
Create a new core
Enter the directory after decompression (replaced by ~ / Solr root /), enter ~ / Solr root / server / Solr /, create a new directory, and define the directory nam ...
Posted by adrianuk29 on Thu, 05 Dec 2019 17:20:28 -0800
Video of PHP tips
major function
Record your actual call operation and call again where you wantJust like anonymous functions, temporary storage of your call operations is generally used for chain calls, and then it actually works on the object you want to operate onIt's like I didn't say it
Usage scenarios
If the laravel project uses the warehouse mode, then fo ...
Posted by MobiTec on Thu, 05 Dec 2019 13:22:53 -0800
Monkey data domain name anti blocking interface reduces the risk of novel being blocked
Recently, there have been frequent complaints on the Internet that the novels they read have been sealed, even if they are not vulgar novels, or they have been shared too many times. The readers are upset and angry, but the business should be the more dry. Especially for paid distribution businesses, the painstaking public numbers are basicall ...
Posted by psycovic23 on Thu, 05 Dec 2019 13:15:25 -0800
Leetcode PHP solution -- D22 806. Number of Lines To Write String
806. Number of Lines To Write String
Title Link
806. Number of Lines To Write String
Title Analysis
Each line can only hold 100 characters, given the width of each character;
Calculates how many lines a given string takes and how many characters the last line takes.
thinking
First of all, the first line can be added directly. When it reaches 1 ...
Posted by danrah on Thu, 05 Dec 2019 12:58:30 -0800
php uses the full calendar plug-in
Recently, I found a lot of plug-ins that are not easy to use when working on the project of curriculum. I accidentally saw the full calendar, which is very simple and convenient. I posted a project page first
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<!-- Calendar plug-in -->
<link href='/public/s ...
Posted by mostwantedunm on Thu, 05 Dec 2019 07:09:46 -0800
Keep alive + nginx + Apache + Mysql to realize highly available and load balanced websites (Part 2)
I. environment introduction
host name
ip
Installation software
nginx_mysql_m
192.168.255.67
keepalived+nginx
nginx_mysql_s
192.168.255.66
keepalived+nginx
mysql1
192.168.255.52
mysql,mysql-server
mysql2
192.168.255.57
mysql,mysql-server
II. keepalived configurationThe configuration of keepalived is similar to that in the previous ...
Posted by theblacksheep on Thu, 05 Dec 2019 03:15:02 -0800