博客 第9页
资料

mac nginx服务器实现局域网内访问本地项目

找到nginx默认的配置文件/usr/local/etc/nginx/nginx.conf修改root,改成自己项目的路径http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 6...
30

java运算符 取整、取绝对值、取余数

舍掉小数取整// 3 Math.floor(3.5) 四舍五入取整// 4 Math.rint(3.5) 进位取整// 4 Math.ceil(3.1) 取绝对值// 3.5 Math.abs(-3.5) 取余数A%B 
24

composer更新及常用命令

查看版本号composer -V升级更新composer self-update全局配置(推荐)composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/取消配置composer config -g --unset r...
27

php 截取中、英文字符串

mb_substr() 函数,截取指定长度的中文字符串mb_substr ( string $str , int $start [, int $length = NULL [, string $encoding = mb_internal_encoding() ]] ) : string参数描述str必需。从该...
20

全国高校数据库

链接: https://pan.baidu.com/s/1BYxMY95IFN-ouPLPEk-wvA提取码:
8

thinkphp6整合jwt

composer安装jwt包创建密钥php think jwt:create使用方式:对于需要验证的路由或者模块添加中间件:thans\jwt\middleware\JWTAuth::class,示例:$token = JWTAuth::builder(['uid' => 1]);//...
18

laravel 数据表中存在就更改当前记录,不存在就添加一条记录

 UserModel::updateOrCreate( ['user_id' => $user_info['user_id']], ['user_name' => $params['user_name']] );user_id为更改时的条件
19

php 根据日期 指定时间 生日计算年龄

if (!function_exists('get_age')){ function get_age($birthday){ $iage = 0; $year = date('Y',strtotime($birthday)); $month = date('m',strtotime($birthday)); $day = date('d',strtotime...
16

curl模拟GET、POST、PUT、DELETE请求(PHP)

<?php namespace App\Helpers\Tool; use App\Helpers\Traits\SingletonTrait; use Illuminate\Support\Facades\Log; class Curl { use SingletonTrait; protected $app_token; public functi...
21

七牛云如何绑定自己的域名

七牛云的测试域名有效期是一个月,过期就不能使用了,所以需要绑定一个自己的域名。登录七牛云后台,在七牛云的'域名管理'中创建一个二级域名,创建完域名后会有一个CNAME值。到自己域名服务商...
28