最新文章

PHPphpseclib利用pem文件登录服务器

phpseclib利用pem文件登录服务器

/*include('Crypt/RSA.php');include('Net/SSH2.php');$key=newCrypt_RSA();//$key->setPassword('whatever');$key->loadKey(file_get_contents('se-ee.pem'));$ssh=newNet_SSH2('xxx.xxx.xx
CentOSCentos一键配置pptp VPN服务(转载)

Centos一键配置pptp VPN服务(转载)

文章来源https://blog.linuxeye.cn/412.html安装脚本wgethttp://mirrors.linuxeye.com/scripts/vpn_centos.shchmod+x./vpn_centos.sh./vpn_centos.sh脚本内容#!/bin/bash##Author:yeho<lj2007331ATgmail.com>#Blog:https://blog.linuxeye.com##InstallsaPPTPVPN-onlysystemforCentO
PHPlaravel打印页面SQL

laravel打印页面SQL

修改app/Providers/AppServiceProvider.phpuseIlluminate\Support\Facades\DB;publicfunctionboot(){DB::listen(function($sql){//$sqlisanobjectwiththeproperties://sql:Thequery//bindings:thesqlqueryvariables//time:Theexecutiontimeforthequery//connectionName:Thename
PHPPHP生成随机汉字

PHP生成随机汉字

functiongetChar($num)//$num为生成汉字的数量{$b='';for($i=0;$i<$num;$i++){//使用chr()函数拼接双字节汉字,前一个chr()为高位字节,后一个为低位字节$a=chr(mt_rand(0xB0,0xD0)).chr(mt_rand(0xA1,0xF0));//转码$b.=iconv('GB2312','UTF-8',$a);}return$b;}echogetChar(mt_rand(100,2
杂项composer修改镜像地址

composer修改镜像地址

国外镜像会很慢,可以修改成阿里云的#所有项目都会使用这个镜像composerconfig-grepo.packagistcomposerhttps://mirrors.aliyun.com/composer/#取消配置composerconfig-g--unsetrepos.packagist#仅修改当前工程配置,仅当前工程可使用该镜像地址composerconfigrepo.packagistcomposer...
Elasticsearchelasticsearch利用x-pack添加权限验证

elasticsearch利用x-pack添加权限验证

viconfig/elasticsearch.ymlxpack.security.enabled:truexpack.security.transport.ssl.enabled:true./bin/elasticsearch-dbin/elasticsearch-setup-passwordsinteractiveelasticsearch-head连接地址修改为http://192.168.36.61:9100/?auth_user=elastic&auth_password=passwd方式