原创 python安裝指定版本的wtforms

因爲新版本的插件存在兼容性問題,要安裝或者回退到老版本的Wtforms 可在項目根目錄下執行 pipenv install WTForms==2.2.1

原创 修改gitlab端口問題以及gitlab訪問出現502問題(參考別人的資料)

由於在linux下安裝gitlab後,默認是80端口,而我們服務器已經存在的nginx已經佔用80端口,因此,需要修改gitlab的端口。 一,命令 sudo vim /etc/gitlab/gitlab.rb後 把文件中的 ex

原创 輸入a,b,c 輸出他們的全部組合,a,b,c,ab,ac,bc,abc

<?php function combine($str,$len) { if (0 == strlen($str)) { return; } for ($i=$len-1;$i>=0;$i-

原创 laravel使用redis緩存

一,laravel安裝redis擴展 composer require predis/predis 備註:如果安裝了lumen微框架還需要安裝illuminate/redis (5.2.) composer require ill

原创 windows下批量複製文件到另外一個目錄

可以用bat執行文件,內容如下 @echo off & copy By author xcopy /S/Y "D:\phpstudy\WWW\schat-hba-api\src\app" "D:\pro\app" xcopy /S

原创 如何在Ubuntu 18.04和16.04上安裝PHP(7.3,7.2和7.0)?(轉載至中文網)

PHP 7.3是PHP最新的穩定版本,如果你想安裝特定版本的PHP,那麼本文將對你有所幫助。本篇文章就將給大家介紹如何使用PPA在Ubuntu 18.04、16.04上安裝PHP 7.3、7.2、7.1和PHP 7.0。(PPA全

原创 How to ignore SELECT list is not in GROUP BY

How to ignore SELECT list is not in GROUP BY? if we need select many field in mysql, at the same time,we only need

原创 linux後臺運行任務命令

比如,laravel項目有一個command任務,在服務器要執行 php artisan command:worker 這個命令是掛起的,總不能一直這樣掛起。 爲了不影響其它操作,我們把它後臺執行。 nohup php arti

原创 nginx同一個端口配置多個網站(以及nginx跨域配置)

一,先看一下nginx.conf文件,如果有下面的一行 include /etc/nginx/sites-enabled/*; 表示配置文件加載sites-enabled下的文件。 二,修改/etc/nginx/sites-ena

原创 composer require本地sdk(laravel示例)

一般情況下,使用第三方sdk的時候,如果github上面有官方的sdk,是最方便的,我們直接composer require sdkname就可以加載進項目。 但是有的sdk,官方只給了一個供下載的壓縮包,並沒有github地址,

原创 composer require速度慢

使用ailiyun鏡像 composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ 禁止安裝時更新 composer requi

原创 laravel之command配合crontab進行定時任務操作

一, php artisan make:command Apple 二,在App\Console\Commands下,修改Apple.php <?php namespace App\Console\Commands; use

原创 2003-Can't connect to MySQL server on 'IP地址'(10038)

解決該問題步驟 一,vi /etc/mysql/mysql.conf.d/mysqld.cnf 二,/bind 找到bind-address =127.0.0.1 在這一行前加上#註釋掉 三,mysql -uroot

原创 rsync for windows client upload file to linux

first download rsync for windows client use this method as follow windows 上rsync客戶端使用方法 經測,該命令可行 rsync.exe -avzP /c

原创 在ubuntu16上搭建gitlab(實測可用)(轉發至這是一個祕密)

1.安裝依賴包,運行命令 sudo apt-get install curl openssh-server ca-certificates postfix 執行完成後,出現郵件配置,選擇Internet那一項(不帶Smarthost的