微信扫码登陆

  • 雷亮
  • 2017-09-10 22:07:40
  • PHP
  • PHP
一,微信开放平台创建网站应用(https://open.weixin.qq.com/) 获取AppID参数与AppSecret;二,--------------实现扫码登陆源码namespace Admin\Controller; use Think\Controller; class LoginController extends
阅读全文

ajax轮询实现长连接

  • 雷亮
  • 2017-08-24 15:36:15
  • PHP
  • PHP
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title</title>
阅读全文

thinkphp3.2.3+laypage+ajax分页

  • 雷亮
  • 2017-08-24 14:37:59
  • PHP
  • PHP
不可描述
阅读全文

php自动识别文本中的链接

  • 雷亮
  • 2017-08-15 15:41:38
  • PHP
  • PHP
function text2links($str='') {if(!preg_match('/(http|www\.|@)/i', $str)) { return $str; }$lines = explode("<br />",&nb
阅读全文

laravel + dingo api + jwt

  • 雷亮
  • 2017-08-11 17:33:09
  • PHP
  • PHP
由于在度娘找了半天根本一大堆Copy版本,弄得我死去活来的,每个都试了一堆问题,到底你们做完有没有总结过一次?然后有几个使用lunmen+dingo api+jwt,完全不行啊,太监版不是我想要的。后来Google,终于找到例子并实测成功。直接来了composer create-project --prefer-dist laravel/laravel &n
阅读全文

php计算两个坐标的位置

  • 雷亮
  • 2017-08-08 16:20:23
  • PHP
  • PHP
/** * 计算两个坐标的直线距离 * * @param $lat1 * @param $ln
阅读全文

中奖概率算法(php 可用于刮刮卡,大转盘等抽奖算法)

  • 雷亮
  • 2017-08-08 09:56:11
  • PHP
<?php /*  * 经典的概率算法,  * $proArr是一个预先设置的数组,  * 假设数组为:array(100,200,300,400),  * 开始是从1,1000 这个概率范围内筛选第一个数是否在他的出现概率范围之内,   * 如果不在,则将概率
阅读全文

PHP常用技巧总结

  • 雷亮
  • 2017-08-08 09:46:28
  • PHP
  • PHP
PHP文件读取函式 //文件读取函式 function PHP_Read($file_name) { $fd=fopen($file_name,r); while($bufline=fgets($fd, 4096)){ $buf.=$bufline; } fclose($fd); return $buf; } ?> 文件写入函式
阅读全文

PHP代码 - 获取随机颜色代码

  • 雷亮
  • 2017-08-05 12:07:17
  • PHP
  • PHP
方法一:完全随机颜色<?php function randColor(){     $colors = array();     for($i = 0;$i<6;$i++){       &
阅读全文

laravel 中文分词插件(elasticsearch)

  • Androwe
  • 2017-08-03 21:32:02
  • PHP
  • PHP
github 地址:https://github.com/medcl/elasticsearch-analysis-ik集成包地址:https://github.com/medcl/elasticsearch-rtf1:下载集成包2:进入目录->解压3:查看插件列表:4:如果内存过小:拷贝插件:删除掉除开analysis-ik的所有插件执行删除操作:5:最后7:启动服务查看是否启动:如果没有
阅读全文
首页 1234 末页 共 37 条记录
  • 本站使用thinkphp搭建 © 2014-2016 blog.wo97.com 版权所有 ICP证:蜀ICP备16024789号
  • 工信部
  • 联系邮箱:1031041088@qq.com