解决SSL证书验证问题的方法(cURL error 60: SSL certificate problem: unable to get local issuer certificate) 后端

$url = 'https://www.xxx.com/aaa.htm'; echo (Http::get($url)->body()); 报错: GuzzleHttp\Exception\RequestException cURL error 60: SSL certificate problem: unable to get lo...
chunkuan 发布于 

windows 设置开机自启的方法 命令行

在 Windows 系统中,你可以通过多种方式设置程序的开机自启动。以下是几种常见的方法: 方法 1:通过“启动”文件夹设置 打开启动文件夹: 按下 Win + R,输入 shell:startup,然后按回车。 或者手动导航到: C:\Users\<你的用户名>\AppData\Roaming\Microsoft\Windows\Sta...
chunkuan 发布于 

给元素添加透明样式(方块块) 前端

.div-name { background-image: linear-gradient(45deg, #f4f4f5 25%, #f000 25%), linear-gradient(135deg, #f4f4f5 25%, #0000 25%), linear-gradient(45deg, #0000 75%, #f4f4f5 75%), ...
chunkuan 发布于 

DcatAdmin 配置富文本,TinyEditor 上传文件,上传视频 后端

Editor::resolving(function (Editor $editor) { $editor->options( [ 'file_picker_callback' => \Dcat\Admin\Support\JavaScript::make(<<<JS ...
chunkuan 发布于 

DcatAdmin 配置富文本,让工具条固定到顶部 后端

在项目app/Admin/bootstrap.php中进行设置: Editor::resolving(function (Editor $editor) { $editor->options( [ 'toolbar_sticky' => true, 'toolbar_stic...
chunkuan 发布于 

Supervisor在mac系统下的安装方法与使用 工具

Supervisor是一个用Python开发的client/server服务,是Linux/Unix系统下的一个进程管理工具,不支持Windows系统。它主要用于管理进程,当一个进程意外被杀死时,Supervisor可以监听到进程死亡并自动重新启动它,从而实现进程的自动恢复功能。以下是在Mac下配置Supervisor的详细步骤: 一、安装Superviso...
chunkuan 发布于 

php中将文件大小进行格式化 后端

如果获取到了文件的大小,可以使用下面的方法进行格式化: <?php /** * 文件大小格式化 */ function filesize_format($size) { $sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"); ...
chunkuan 发布于 

在 PHP 中,如果只想从一个数组中获取特定的字段,可以使用array_intersect_key 后端

在 PHP 中,如果你只想从一个数组中获取特定的字段,你可以使用 array_intersect_key 函数结合一个包含你所需键的数组来实现。这种方法不会改变原始数组,而是返回一个新的数组,只包含你指定的键。 下面是一个示例,展示了如何从 $video_data 数组中提取 video_id、url 和 title 三个字段: <?php $vide...
chunkuan 发布于 

本地Laravel项目配置nginx虚拟主机 命令行

配置nginx虚拟主机(Laravel): server { listen 80; server_name hello.test; index index.php index.html; root /Users/chunkuan/data/wwwroot/hello.test/public; loc...
chunkuan 发布于 

acme.sh 可以从 letsencrypt 生成免费的证书

1. 安装 acme.sh 安装很简单, 一个命令: curl https://get.acme.sh | sh -s email=my@example.com 普通用户和 root 用户都可以安装使用. 安装过程进行了以下几步: 1.把 acme.sh 安装到你的 home 目录下: ~/.acme.sh/ 并创建 一个 shell 的 alias, 例如...
chunkuan 发布于