tp5.1 使用swoole做服务器简单的接口性能测试

5-08 4,147 views

官方测试地址:官方测试 最近在看tp5.1的think-swoole支持,作为替代php-fpm的一种方案,现在简单的用swoole做为http服务器和用传统的php-fpm分别测试下接口...
阅读全文 0

PHP函数学习之——func_get_args

4-27 2,024 views

官方说明 说明 func_get_args ( void ) : array 获取函数参数列表的数组。 该函数可以配合 func_get_arg() 和 func_num_args() 一起使用,从而使得用户自定...
阅读全文 0

Mysql 分页优化

4-14 2,330 views

在系统中需要进行分页的时候,我们通常会使用limit 加上偏移量的方法实现,再加上合适的order by 子句,如果有对应的索引,通常效率会很不错,否则mysql需要...
阅读全文 0

lcobucci/jwt —— 一个轻松生成jwt token的插件

4-09 12,863 views

github: https://github.com/lcobucci/jwt/tree/3.4 1.安装 "lcobucci/jwt": "^3.4"版本 php >= 5.6 OpenSSL Extension // 安装 $ ...
阅读全文 2

laravel/lumen —— API 插件 dingo/api

4-08 2,731 views

文档:https://github.com/dingo/api/wiki/Installation 1.安装 #PHP ^7.1 (However soon to be PHP 7.2) composer require dingo/api #LARAVEL php artisa...
阅读全文 0

guzzle —— Guzzle是一个PHP的HTTP客户端,轻松搞定get、post、分流上传下载大文件、http cookies等等

4-07 4,258 views

官方文档:https://guzzle-cn.readthedocs.io/zh_CN/latest/index.html github: https://github.com/guzzle/guzzle 安装 composer require guzzlehttp/guzz...
阅读全文 0

lumen 自定义接口返回成功失败数据格式

4-07 3,721 views

我的lumen版本,5.8 1.找到 app/Http/Controllers/Controller.php 修改成如下代码: <?php namespace App\Http\Controllers; use Laravel\Lumen\Routi...
阅读全文 0

Failed to clear cache. Make sure you have the appropriate permissions.

4-06 4,708 views

php artisan cache:clear 出现 Failed to clear cache. Make sure you have the appropriate permissions 您最近是否从以前的Laravel版本升级了?该Failed to...
阅读全文 0

一个好用的php 操作 shell 包 php-shellcommand

3-28 2,705 views

Github :https://github.com/mikehaertl/php-shellcommand 安装 (php > 5.4) composer require mikehaertl/php-shellcommand 例子 <?php use mikeha...
阅读全文 1

PHP 如何使用 Service 模式?

3-21 3,366 views

若将商业逻辑都写在 controller,会造成 controller 肥大而难以维护,基于SOLID原则,我们应该使用 Service 模式辅助 controller,将相关的商业逻辑封装在不...
阅读全文 0