wsl ubuntu 安装 oh-my-zsh

安装zshsudo apt install git zsh -y 安装oh-my-zsh码云地址https://gitee.com/mirrors/oh-my-zsh执行其中的tools/install.sh如果无法clone github代码可以尝试把ip写入host安装自动补全git clone https://github.com/zsh-users/zsh-autosuggestio...

继续阅读 »

mysql coalesce json处理操作符

COALESCE 返回第一个非空值select COALESCE(country,extra_fields->>'$.buyer_nationality') as country_code可以多个参数->和->>差异-> 永远返回的是json,例如返回字符串abc,则返回的是"abc",有引号 ->> 返回本来的值,没有引...

继续阅读 »

打包phar直接运行

准备下载swoole cli,其中有一个pack-sfx.phpphp.ini中有个phar.readonly = Off打包phar<?php // 禁止缓冲输出,以便立即看到错误信息 ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); // 确保Ph...

继续阅读 »

php 流式请求

原生curl$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->chatService->api); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HTTPH...

继续阅读 »