- 博客(20)
- 收藏
- 关注
原创 golang,cc1.exe: sorry, unimplemented: 64-bit mode not compiled in问题解决
golang编译报错
2022-06-07 11:15:47
637
原创 php局部静态变量初始化多次的特殊情况
class test extends test1{function test(){ $this->test1();}}class test2 extends test1{function test2(){ $this->test1();}}class test1{function test1(){static $test1 = 0; //static $var = 1+1;就会报错$test1++;echo $test1 . ’ ';}}
2021-10-12 14:03:44
227
1
原创 并发使用协程的体会
1.setDefer可以实现协程内并发请求,但是不代表一定能够缩短进程的执行时间,因为取决请求的服务的并发处理能力,进程的执行时间决定于最耗时那个线程。2.setDefer可以实现协程内并发请求,相当于开启多个协程。...
2020-10-20 23:48:28
125
原创 git冲突编辑
<<<<<<< HEADnew new new new codeold old old codexxxxxxxxxxxxxxxxxxxxxxx分析:head 到 =======里面的lalala是自己的commit的内容=========到 >>>>>>里面的hehehe是下拉的内容根据需要删除代码就行了 完事把<<<<<<< ======= &
2020-08-23 12:03:08
247
1
原创 拉取本地不存在的远程分支报错“...not a commit..”解决
$ git checkout -b dev2 origin/dev2fatal: ‘origin/dev2’ is not a commit and a branch ‘dev2’ cannot be created from it分析:这样证明本地分支没有跟远程分支连接连接解决:使用git fetch 更新remote索引验证:使用git branch -a 可以查看到远程分支然后再执行git checkout -b dev2 origin/dev2就可以了...
2020-08-16 07:49:43
1757
原创 缓存击穿
缓存雪崩处理:1.使用setnx加锁排队。2.设置两个AB缓存 3.限流降级缓存穿透:缓存为空不要立即loaddb,要setnx成功才load,否则尝试get
2020-08-03 22:37:45
115
原创 array_slice和array_splice
array_slice类似于substr返回子串array_splice移除子元素并且用新元素替代
2020-05-23 16:51:39
237
原创 遇到is not within the allowed path(s)报错解决办法
报错信息:is not within the allowed path(s):总结:发现不是目录下的.user.ini文件的问题,还有php.ini的配置问题,而是fastcgi.conf的配置问题PHP 版本:PHP7安装方式:LNMP 一键包:Linux 一键安装 Nginx + MySQL + PHP 环境问题原因:open_basedir 里没有包含到 public 这个路径。解...
2020-04-20 15:41:48
18322
1
原创 laravel好用的collection方法
一.背景:业务开发对二维数组频繁操作,故总结一下好用的collection方法。原本数据结构:Illuminate\Database\Eloquent\Collection {#2988 all: [ App\Model\NotifyModel {#3009 notify_id: 1, user_id: 1, co...
2020-04-16 11:41:56
724
原创 swoole+redis订阅模式实现实时消息推送
一.背景:本来想在网上搜索方案,发现有两种方案:1.在服务器用定时器轮询访问数据源,这不是真正的实时。2.是使用laravel-echo-server的模块实现,底层以来nodejs,还有对框架依赖性太强。所以自己想出了一套解决方案。二.代码实现如下:websocket端代码<?php$table = new swoole_table(1024);$table->colu...
2020-04-16 09:54:35
1764
原创 laravel使用队列有个细节注意
<?phpnamespace App\Jobs\Admin;use Illuminate\Bus\Queueable;use Illuminate\Queue\SerializesModels;use Illuminate\Queue\InteractsWithQueue;use Illuminate\Contracts\Queue\ShouldQueue;use Illum...
2020-04-14 18:21:34
625
原创 mysql事务重要参数innodb_flush_log_at_trx_commit
一、参数解释0:innodb_log_buffer将每秒一次地写入log file中,并且log file的flush(刷到磁盘)操作同时进行。1:每次事务提交时MySQL都会实时把innodb_log_buffer的数据写入log file,并且立即flush(刷到磁盘)中去,该模式为系统默认。2:每次事务提交时MySQL都会把innodb_log_buffer的数据写入log file,...
2020-04-05 13:49:22
2381
原创 ueditor简单图片上传,iframe跨域问题的完美解决
var w = containerBtn.offsetWidth || 20, h = containerBtn.offsetHeight || 20, btnIframe = document.createElement(‘iframe’), btnStyle = ‘display:block;width:’ + w + ‘px;heigh...
2018-08-25 16:35:15
3063
4
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人