PHP
创建索引<?php/***https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index_management.html*https://open.163.com/newview/movie/free?pid=XGG8PCIUJ&mid=HGG8PFDRB*/useElasticsearch\ClientBuilder;require'./vendor/autoload.php
阅读1452021-09-05 12:07:48
PHP
<?php#https://xie.infoq.cn/article/9b0827c018443828d2f0ebedf#https://www.bbsmax.com/A/lk5aQwbZ51/#https://www.php.cn/php-weizijiaocheng-387074.html#setbitu:sign:1000:202108171uid:monthday1/*127.0.0.1:6379>setbitu:sign:1000:202108171(integer)0127.0.0
阅读852021-08-27 18:04:55
PHP
修改app/Providers/AppServiceProvider.phpuseIlluminate\Support\Facades\DB;publicfunctionboot(){DB::listen(function($sql){//$sqlisanobjectwiththeproperties://sql:Thequery//bindings:thesqlqueryvariables//time:Theexecutiontimeforthequery//connectionName:Thename
阅读1232019-09-12 08:49:21
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
阅读2372019-09-09 12:42:24
PHP
/***启动守护进程*/publicfunctionrunAction(){log_message('ERROR','daemon/run'.'|action:restart','daemon-');while(true){$this->fork_process();}exit;}/***创建子进程*/privatefunctionfork_process(){$ppid=
阅读1232018-11-14 14:43:56
PHP
$headers=array("TYPE:xxxxooooo","TOKEN:00000000");$data=array('data'=>array('name'=>'test','AGE'=>22),'registration_ids'=>array('APA91b
阅读1262018-11-14 14:16:26
PHP
<!DOCTYPEhtml><html><head><metacharset="UTF-8"/><title>xhr2</title></head><body><divid="drop_area"style="border:3pxdashedsilver;width:200px;height:200px">将图片拖拽到此</div&g
阅读642018-11-09 10:32:15
PHP
微信JS-SDK是微信公众平台 面向网页开发者提供的基于微信内的网页开发工具包。通过使用微信JS-SDK,网页开发者可借助微信高效地使用拍照、选图、语音、位置等手机系统的能力,同时可以直接使用微信分享、扫一扫、卡券、支付等微信特有的能力,为微信用户提供更优质的网页体验。首先...
阅读2002018-05-08 19:14:17
PHP
使用公众号之前,需先要有菜单,下面来讲讲利用接口生成菜单栏。首先获取全局access_token,这个access_token和网页授权时的access_token是两个不同的东西。/***获取全局TOKEN*@returnmixed*/publicfunctiongetAccessToken(){$access_token_cache=$this->getCache('access_token&...
阅读1142018-05-08 17:46:56
PHP
如果用户在微信客户端中访问第三方网页,公众号可以通过微信网页授权机制,来获取用户基本信息,进而实现业务逻辑(oauth2机制)。注意,在开发的时候,我们先设置网页授权回调域名先到公众平台官网中的“开发 - 接口权限 - 网页服务 - 网页帐号 - 网页授权获取用户基本信息...
阅读4822018-05-08 17:35:17