上一页 1 2 3 4 5 6 ··· 31 下一页
摘要: PHP 中 CLI模式下接收参数的三大方式 1 argv 方式 php test.php news 1 5 //变量仅在 register_argc_argv 打开时可用。 print_r($argc); //CLI下获取参数的数目,最小值为1 print_r($argv); //CLI下传递给脚本 阅读全文
posted @ 2021-01-05 15:56 依然范儿特西 阅读(787) 评论(0) 推荐(0) 编辑
摘要: 函数对0的判断 $cast_id = 0; var_dump(strlen($cast_id)); //1 var_dump(empty($cast_id)); // true var_dump(isset($cast_id)); //true var_dump(is_null($cast_id)) 阅读全文
posted @ 2020-12-24 15:55 依然范儿特西 阅读(932) 评论(0) 推荐(0) 编辑
摘要: 上代码 <?php /** * 分布式 id 生成类 组成: <毫秒级时间戳+机器id+序列号> * 默认情况下41bit的时间戳可以支持该算法使用到2082年,10bit的工作机器id可以支持1023台机器,序列号支持1毫秒产生4095个自增序列id * @author zhangqi */ cl 阅读全文
posted @ 2020-12-02 15:05 依然范儿特西 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 什么是威尔逊区间? 此处省略一万多个字 假设你已经是个成熟的程序猿了。不需要给你说理论了。。直接上代码吧 php版本 echo wilsonScore_2(300, 13/300, 2); function wilsonScore_2($n, $p, $z){ $a_1 = ((1 / (2 * $ 阅读全文
posted @ 2020-12-02 09:43 依然范儿特西 阅读(889) 评论(0) 推荐(1) 编辑
摘要: github: https://github.com/tecnickcom/TCPDF 将字体复制到TCPDF\tools 目录下 打开CMD窗口定位到 vendor\tecnickcom\TCPDF\tools 目录 执行下面的命令 我们以微软雅黑字体为例 php ./tcpdf_addfont. 阅读全文
posted @ 2020-11-27 13:32 依然范儿特西 阅读(366) 评论(0) 推荐(0) 编辑
摘要: html <template> <div class="wrapper"> <div class="container"> <div class="menu"> <ul class="menu-list"> <li v-for="(nav, index) in navList" :key="inde 阅读全文
posted @ 2020-11-07 22:15 依然范儿特西 阅读(1644) 评论(1) 推荐(0) 编辑
摘要: 直接上代码吧。全局路由中间件 <?php namespace App\Http\Middleware; use Closure; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; use Illuminate 阅读全文
posted @ 2020-10-19 17:14 依然范儿特西 阅读(1204) 评论(0) 推荐(0) 编辑
摘要: 在数据查询时候,多条件查询,使用场景 //单个值 $data_where['id'] = 1 // in 条件 写法一 $ids = [1,2,3,4,5]; $data_where[] = [DB::raw("字段名 in ({$ids})"),'1']; //in条件写法二 $data_wher 阅读全文
posted @ 2020-10-18 19:22 依然范儿特西 阅读(638) 评论(0) 推荐(0) 编辑
摘要: 操作原理 关键的操作思想: 构造一个中间人代理,它有能力完成TLS/SSL握手 弄到一个根证书,并用它生成签名认证的代理服务器证书 Charles就是一个理想的中间人,它支持SSL握手,可以自动根据根证书生成一个签名的服务器证书,并且它的官网为我们提供了一个根证书。 我们要做的就是在客户端安装好这个 阅读全文
posted @ 2020-10-15 14:01 依然范儿特西 阅读(600) 评论(0) 推荐(0) 编辑
摘要: PHP 7 以下版本使用 set_error_handler 捕获异常 <?php error_reporting(E_ALL); set_error_handler('handle_error'); function handle_error($no,$msg,$file,$line){ // 执 阅读全文
posted @ 2020-10-09 19:21 依然范儿特西 阅读(293) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 31 下一页