2025年5月9日

http curl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<?php
namespace app;
 
use App\Library\Common;
use App\Library\Exception\ExceptionApp;
use App\Tools\unknown;
 
class HttpCurl
{
 
    public static function sendPost($url, $data, & $status = null, $timeout = 10, $header = [])
    {
 
        $curl = curl_init(); // 启动一个CURL会话
        curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在
        if ( !empty ($data)) {
            curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); // Post提交的数据包
        }
        curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); // 设置超时限制防止死循环
        $defaultHeader = ['Expect:'];
        //当传入header时合并处理,之前传入的header会被覆盖
        if ($header && is_array($header)) {
            $defaultHeader = array_merge($defaultHeader, $header);
        }
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
        curl_setopt($curl, CURLOPT_HTTPHEADER, $defaultHeader); //设置HTTP头
        $result = curl_exec($curl); // 执行操作
        $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
        $errmsg = ',status:'.$status;
        if ($result === false) {
            $errmsg .= ',errmsg:'.curl_error($curl);
        }
        curl_close($curl); // 关闭CURL会话
        return $result;
 
    }
 
    public static function sendJsonPost($url, $data, & $status = null, $timeout = 10, $header = [])
    {
        $curl = curl_init(); // 启动一个CURL会话
        curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在
        if ( !empty ($data)) {
            $strJsonData = json_encode($data);
            curl_setopt($curl, CURLOPT_POSTFIELDS, $strJsonData); // Post提交的数据包
        }
        curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); // 设置超时限制防止死循环
        $defaultHeader = [
            'Expect:',
            'Content-Type: application/json',             // 设置内容类型为JSON
            'Content-Length: ' . strlen(json_encode($data))     // 设置内容长度
        ];
        //当传入header时合并处理,之前传入的header会被覆盖
        if ($header && is_array($header)) {
            $defaultHeader = array_merge($defaultHeader, $header);
        }
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
        curl_setopt($curl, CURLOPT_HTTPHEADER, $defaultHeader); //设置HTTP头
        $result = curl_exec($curl); // 执行操作
        $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
        $errmsg = ',status:'.$status;
        if ($result === false) {
            $errmsg .= ',errmsg:'.curl_error($curl);
            Common::logNewError("", "http请求失败", new ExceptionApp($errmsg));
        }
        curl_close($curl); // 关闭CURL会话
        return $result;
 
    }
 
    public static function sendJsonPost256($url, $data, & $status = null, $timeout = 10, $header = [])
    {
 
        $curl = curl_init(); // 启动一个CURL会话
        curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在
        if ( !empty ($data)) {
            $strJsonData = json_encode($data, JSON_UNESCAPED_UNICODE);
            curl_setopt($curl, CURLOPT_POSTFIELDS, $strJsonData); // Post提交的数据包
        }
        curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); // 设置超时限制防止死循环
        $defaultHeader = ['Expect:',
            'Content-Type: application/json',             // 设置内容类型为JSON
            'Content-Length: ' . strlen(json_encode($data))     // 设置内容长度
            ];
        //当传入header时合并处理,之前传入的header会被覆盖
        if ($header && is_array($header)) {
            $defaultHeader = array_merge($defaultHeader, $header);
        }
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
        curl_setopt($curl, CURLOPT_HTTPHEADER, $defaultHeader); //设置HTTP头
        $result = curl_exec($curl); // 执行操作
        $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
        $errmsg = ',status:'.$status;
        if ($result === false) {
            $errmsg .= ',errmsg:'.curl_error($curl);
        }
        curl_close($curl); // 关闭CURL会话
        return $result;
 
    }
     
    /**
     * @param unknown $url 请求网址
     * @param string $params 请求参数
     * @param string $requestType 请求方式 POST、POST-JSON,默认POST
     * @return string|unknown
     */
    public static function sendPostV2($url, $params = false, $requestType = "POST", $headers = [])
    {
        $requestType = strtoupper($requestType);
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_HEADER, 0);//不抓取头部信息。只返回数据
        curl_setopt($curl, CURLOPT_TIMEOUT,1000);//超时设置
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);//1表示不返回bool值
        curl_setopt($curl, CURLOPT_HTTPPROXYTUNNEL, true);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($curl, CURLOPT_POST, 1);
        if('POST' == $requestType){
            empty($headers) && $headers = array('Content-Type: application/x-www-form-urlencoded');
            curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);//重点
            curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
        }else if('POST-JSON' == $requestType){//post json格式数据
            curl_setopt($curl, CURLOPT_HTTPHEADER, array(
                'Content-Type: application/json; charset=utf-8',
                'Cache-Control: no-cache',
                'Pragma: no-cache'
            ));//重点
            curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($params));
        }
        Common::logInfo("", "http请求参数,method:".$requestType, ['url'=>$url,'data'=>$params,'headers'=>$headers]);
        $response = curl_exec($curl);
        $rst = (!empty($response) && !empty($responseArr = json_decode($response, true))) ? json_encode($responseArr, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE) : $response;
        Common::logInfo("", "http响应结果:"$rst);
        if (curl_errno($curl)) {
            return curl_error($curl);
        }
        curl_close($curl);
        $response = json_decode($response,true);
        return $response;
    }
 
    /**
     * 发送get请求
     * @param $url
     * @param $data
     * @param null $status
     * @param int $timeout
     * @param array $header
     * @return mixed
     */
    public static function sendGet($url, $data, & $status = null, $timeout = 10, $header = [])
    {
        if ( !empty ($data)) {
            (strpos($url, "?") !== false ) ? $url = $url . "&" .  http_build_query($data) : $url = $url "?" .  http_build_query($data);
        }
        $curl = curl_init(); // 启动一个CURL会话
        curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在
        curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); // 设置超时限制防止死循环
        $defaultHeader = ['Expect:','Content-Type:application/json'
            ];//'Content-Type:text/xml','Connection:Keep-Alive'
        //当传入header时合并处理,之前传入的header会被覆盖
        if ($header && is_array($header)) {
            $defaultHeader = array_merge($defaultHeader, $header);
        }
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
        curl_setopt($curl, CURLOPT_HTTPHEADER, $defaultHeader); //设置HTTP头
        $result = curl_exec($curl); // 执行操作
        $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
        $errmsg = ',status:'.$status;
        if ($result === false) {
            $errmsg .= ',errmsg:'.curl_error($curl);
        }
        curl_close($curl); // 关闭CURL会话
        return $result;
 
    }
 
    public static function sendMsGet($url, $data, & $status = null, $timeout = 10000, $header = [])
    {
        if ( !empty ($data)) {
            (strpos($url, "?") !== false ) ? $url = $url . "&" .  http_build_query($data) : $url = $url "?" .  http_build_query($data);
        }
        $curl = curl_init(); // 启动一个CURL会话
        curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在
        curl_setopt($curl, CURLOPT_TIMEOUT_MS, $timeout); // 设置超时限制防止死循环
        $defaultHeader = ['Expect:'];
        //当传入header时合并处理,之前传入的header会被覆盖
        if ($header && is_array($header)) {
            $defaultHeader = array_merge($defaultHeader, $header);
        }
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
        curl_setopt($curl, CURLOPT_HTTPHEADER, $defaultHeader); //设置HTTP头
        $result = curl_exec($curl); // 执行操作
        $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
        $errmsg = ',status:'.$status;
        if ($result === false) {
            $errmsg .= ',errmsg:'.curl_error($curl);
        }
        curl_close($curl); // 关闭CURL会话
        return $result;
 
    }
 
    public static function sendGetV2($url, $data, & $status = null, $timeout = 10, $header = [])
    {
        if ( !empty ($data)) {
            (strpos($url, "?") !== false ) ? $url = $url . "&" .  http_build_query($data) : $url = $url "?" .  http_build_query($data);
        }
        $curl = curl_init(); // 启动一个CURL会话
        curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在
        curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); // 设置超时限制防止死循环
        curl_setopt($curl,CURLOPT_HEADER,true);
        $defaultHeader = ['Expect:'];
        //当传入header时合并处理,之前传入的header会被覆盖
        if ($header && is_array($header)) {
            $defaultHeader = array_merge($defaultHeader, $header);
        }
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
        curl_setopt($curl, CURLOPT_HTTPHEADER, $defaultHeader); //设置HTTP头
        curl_setopt($curl, CURLOPT_HEADER, true);
        curl_setopt($curl, CURLOPT_NOBODY , true);
 
        $result = curl_exec($curl); // 执行操作
 
        $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
        $errmsg = ',status:'.$status;
 
        if ($result === false) {
            $errmsg .= ',errmsg:'.curl_error($curl);
            Common::logNewError("", "http请求失败", new ExceptionApp($errmsg));
        }
 
        $res = [
            'header' => str_replace(["\n", "\t", "\r"], '', $result),
            'code' => $status
        ];
        curl_close($curl); // 关闭CURL会话
        return $res;
 
    }
}

  

posted @ 2025-05-09 21:47 andydaopeng 阅读(7) 评论(0) 推荐(0)

2025年3月19日

AI

摘要: 快手可灵 文生视频不如即梦,文生图不如mj,Gemini。 Cursor编程助手 kimi、智谱、deepseek、纳米AI 阅读全文

posted @ 2025-03-19 16:32 andydaopeng 阅读(9) 评论(0) 推荐(0)

2025年3月4日

PHP Composer依赖包vendor手动导入

摘要: 方式一:手动配置autoload文件 第一步:将下载的依赖包放到vendor目录下。你可以根据喜好将包放置在vendor目录下的任意位置。 第二步:修改autoload_psr4.php文件,将自己的依赖包填写进去。文件位于vendor/composer/autoload_psr4.php,例如假设 阅读全文

posted @ 2025-03-04 15:38 andydaopeng 阅读(197) 评论(0) 推荐(0)

2025年2月10日

laravel解决跨域处理

摘要: laravel 跨域处理 ,不用第三方扩展包: 如果你想在Laravel中处理跨域请求而不使用第三方扩展包,你可以手动创建一个中间件来添加必要的CORS头部。以下是实现这一功能的步骤: 创建中间件: 使用Artisan命令创建一个新的中间件: php artisan make:middleware 阅读全文

posted @ 2025-02-10 22:03 andydaopeng 阅读(271) 评论(0) 推荐(0)

2024年12月10日

Element UI 相关问题及使用技巧总结

摘要: 1、Elementui组件 el-cascader单选框需要单击两次才能选中? 参考 感觉这个与组件的v-model绑定的参数值有关如下,如果参数如b参数放在对象中则会有问题,像a一样定义,不要放在对象中例如,v-model绑定值a就解决了 data(){ return{ a: null, obj: 阅读全文

posted @ 2024-12-10 09:24 andydaopeng 阅读(42) 评论(0) 推荐(0)

2024年11月22日

智慧城市页面小组件

摘要: 上传单张图片: 效果图如: use common\helpers\ComponentHelper; ComponentHelper::loadComponentView('com-attachment'); <el-form-item label="门店套餐图片:"> <com-attachment 阅读全文

posted @ 2024-11-22 16:02 andydaopeng 阅读(8) 评论(0) 推荐(0)

2024年11月12日

php xml相关操作

摘要: <?php class Utils{ /** * 将数据转为XML */ public static function toXml($array){ $xml = '<xml>'; forEach($array as $k=>$v){ $xml.='<'.$k.'><![CDATA['.$v.']] 阅读全文

posted @ 2024-11-12 17:28 andydaopeng 阅读(5) 评论(0) 推荐(0)

vue2相关

摘要: v-html: 原始 HTML 双大括号会将数据解释为普通文本,而非 HTML 代码。为了输出真正的 HTML,你需要使用 v-html 指令: <p>Using mustaches: {{ rawHtml }}</p> <p>Using v-html directive: <span v-html 阅读全文

posted @ 2024-11-12 09:50 andydaopeng 阅读(12) 评论(0) 推荐(0)

2024年11月9日

yii2相关

摘要: yii2相关文档1 文档2 饿了么UI element UI 文档 vue拖拽组件文档 有赞: phpstudy nginx yii2:伪静态: location / { index index.html index.htm index.php; if (!-e $request_filename) 阅读全文

posted @ 2024-11-09 13:42 andydaopeng 阅读(6) 评论(0) 推荐(0)

2024年8月20日

PHP根据经纬度展示附近数据

摘要: 在开发地理位置相关的应用中,经常会遇到根据用户提供的经纬度信息,显示附近的数据的需求。这种需求可以很好地应用在周边商家检索、附近活动推荐等场景中。本文将介绍如何利用PHP根据用户提供的经纬度,在数据库中检索并展示附近的数据。 1. 数据准备 首先,我们需要一个含有经度xpoint和纬度ypoint字 阅读全文

posted @ 2024-08-20 15:45 andydaopeng 阅读(203) 评论(0) 推荐(0)

2024年6月25日

手机端存储用户信息

摘要: js localStorage // 设置带有过期时间的 localStorage 数据项,单位是秒 Storage.prototype.setItemV2 = function(key, value, ttl) { if(ttl){ ttl = ttl * 1000; } const now = 阅读全文

posted @ 2024-06-25 15:25 andydaopeng 阅读(19) 评论(0) 推荐(0)

2024年6月5日

微信支付、支付宝支付

摘要: 第三方支付文档:https://pay.yansongda.cn/docs/v2/wechat/pay#%E4%BD%BF%E7%94%A8-app-%E5%B0%8F%E7%A8%8B%E5%BA%8F-%E8%B4%A6%E5%8F%B7%E8%BD%AC%E8%B4%A6 阅读全文

posted @ 2024-06-05 18:27 andydaopeng 阅读(19) 评论(0) 推荐(0)

2024年4月26日

js jquery方法汇总

摘要: 1、调用函数删除所有参数 function removeUrlAllParameters() { var url = new URL(window.location.href); url.search = ''; // 清空所有查询参数 window.history.pushState(null, 阅读全文

posted @ 2024-04-26 18:22 andydaopeng 阅读(6) 评论(0) 推荐(0)

2024年4月3日

phpstudy php8.2.9版本问题

摘要: 1、如果php8的扩展控制面板开启无效的话,可以手动开启试试 2、php有报错日志: Fatal error: Directive 'track_errors' is no longer available in PHP in Unknown on line 0 在切换php版本到更高版本时在终端查 阅读全文

posted @ 2024-04-03 17:34 andydaopeng 阅读(3231) 评论(0) 推荐(0)

2024年3月28日

各种AI大模型(chatgpt)汇总 人工智能

摘要: 国外的(免费的,但需要登录vpn):https://www.coze.com/space/7312693780673740801/bot/7312695093595537409 kimi: https://kimi.moonshot.cn/chat/cnu06eonsmmisb95h9e0 智谱清言 阅读全文

posted @ 2024-03-28 16:30 andydaopeng 阅读(111) 评论(0) 推荐(0)

2024年3月15日

ubuntu安装宝塔面板教程, 并且配置 varnish缓存

摘要: 一.远程链接服务器 二.安装宝塔面板 1.执行安装命令,当询问各类安装时,均输入y同意,并回车继续运行。 wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh ed 阅读全文

posted @ 2024-03-15 11:57 andydaopeng 阅读(2551) 评论(0) 推荐(0)

2024年3月12日

使用Echarts和JSPDF图表到PDF

摘要: 我已经创建了一个带有echarts的图形,并希望使用JSPDF将其包括在PDF中。 一世 成立 这样做的一种方法可能是使用画布,将图形传输到图像, 最后将图像包括在PDF中。但是,我无法将图形传输到图像。这是代码: <!DOCTYPE html> <html> <head> <meta http-e 阅读全文

posted @ 2024-03-12 14:45 andydaopeng 阅读(129) 评论(0) 推荐(0)

2024年3月8日

echarts报表生成pdf文件

摘要: 完整的demo如下: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>Balken</title> <script src="stati 阅读全文

posted @ 2024-03-08 15:52 andydaopeng 阅读(112) 评论(0) 推荐(0)

jsPDF 文字、图片生成PDF(解决中文乱码)

摘要: JSPDF官网在线演示地址(不支持中文) 思源黑体字体库下载地址:https://gitee.com/ABCpril/SourceHansTtf https://github.com/adobe-fonts/source-han-sans/blob/release/README.md (后面一个是完 阅读全文

posted @ 2024-03-08 11:47 andydaopeng 阅读(4102) 评论(0) 推荐(0)

2024年2月29日

laravel model

摘要: $query = DB::table(self::$_table) ->when(!empty($params), function($query) use ($params){ foreach ($params as $column=>$val){ $query->where($column, $ 阅读全文

posted @ 2024-02-29 14:45 andydaopeng 阅读(11) 评论(0) 推荐(0)

2024年2月28日

php 生成小程序二维码

摘要: public function generate($code, $isShow) { // 构建二维码参数 $scene = 'C=' . $code.'&path=green'; $params = [ "scene" => $scene, 'page' => 'pages/login/regis 阅读全文

posted @ 2024-02-28 16:03 andydaopeng 阅读(89) 评论(0) 推荐(0)

2024年2月27日

facebook, twitter, linkedin等的分享功能

摘要: 1. facebook分享 方法一:传入参数,此时标题获取的是页面title标签中的内容 <!DOCTYPE html> <html lang="en"> <head> <title>Document</title> </head> <body> <a href="https://www.faceb 阅读全文

posted @ 2024-02-27 18:33 andydaopeng 阅读(262) 评论(0) 推荐(0)

2024年1月30日

php 安装imagic扩展及服务

摘要: https://www.cnblogs.com/jinxiblog/p/8053008.html 最近的PHP项目中,需要用到切图和缩图的效果,在本地windows开发环境,安装过程遇到好多问题,在此与大家分享。 php官网里,一大群老外也看不懂这玩意怎么装,主要原因在于,php版本庞杂,还有x86 阅读全文

posted @ 2024-01-30 11:53 andydaopeng 阅读(757) 评论(0) 推荐(0)

2024年1月29日

php 从pdf中提取图片(图像)

摘要: ubuntu@VM-0-13-ubuntu:/www/wwwroot/product_ms$ pdfimages -list -f 6 -l 7 Command 'pdfimages' not found, but can be installed with: sudo apt install po 阅读全文

posted @ 2024-01-29 15:49 andydaopeng 阅读(180) 评论(0) 推荐(0)

2024年1月26日

pdfjs

摘要: 参考 demo: https://pdfjs.express/demo 阅读全文

posted @ 2024-01-26 15:26 andydaopeng 阅读(20) 评论(0) 推荐(0)

2024年1月24日

laravel 跨域

摘要: laravel怎么设置跨域(两种方法) 在前后端分离的项目中,前端请求后端接口时可能会遇到跨域的问题。其中,一个典型的场景是:前端项目运行在 http://localhost:8080,而后端项目运行在 http://localhost:8000,这时候就需要设置跨域。 在 Laravel 中,要设 阅读全文

posted @ 2024-01-24 11:03 andydaopeng 阅读(933) 评论(0) 推荐(0)

2023年12月20日

ffmpeg

摘要: php ffmpeg组件: PHP基础知识之————PHP Web脚本中使用FFmpeg 参考:https://blog.51cto.com/tinywan/6171599 参考文献: http://trac.ffmpeg.org/wiki/PHP https://github.com/PHP-FF 阅读全文

posted @ 2023-12-20 11:11 andydaopeng 阅读(10) 评论(0) 推荐(0)

2023年11月2日

PHP 合成gif 图片

摘要: 方法一: <?php namespace App\Services\Common; //namespace gifCreator; /** * Create an animated GIF from multiple images */ class Gifcreator { /** * @var s 阅读全文

posted @ 2023-11-02 13:43 andydaopeng 阅读(90) 评论(0) 推荐(0)

2023年10月8日

layui 相关

摘要: //layui table filter 监听筛选列工具条的点击事件(解决table右上角筛选时列名称不显示问题)table.on('toolbar(currentTableFilter)', function(obj){ if(obj.event 'LAYTABLE_COLS'){// 筛选列按钮 阅读全文

posted @ 2023-10-08 13:37 andydaopeng 阅读(64) 评论(0) 推荐(0)

2023年9月1日

H5 及 web 页面微信授权登录流程

摘要: https://blog.csdn.net/joe0235/article/details/115935515 一、事先准备工作配置参数测试公众平台信息(测试号相关配置示例): 1、打开公众平台的测试账号 2、配置js接口安全域名 3、扫码关注测试公众号 4、修改网页授权地址 配置授权回调的域名,至 阅读全文

posted @ 2023-09-01 11:38 andydaopeng 阅读(2461) 评论(0) 推荐(0)

2023年8月18日

postman进行环境变量设置,全局变量设置 pm.response.json()

摘要: 环境变量的设置 在开发和测试的过程中,经常在开发环境,测试环境,生产环境来回切换,这样每次都要修改域名很麻烦,好在postman提供了可以切换环境更改域名的方法,这样只要配置好环境变量就可以切换域名了。具体操作步骤如下:1.点击postman右上角眼镜的图标2.点击“Add”按钮3.填写域名备注,域 阅读全文

posted @ 2023-08-18 10:59 andydaopeng 阅读(732) 评论(0) 推荐(0)

2023年7月26日

js 图片剪切

摘要: 1、 /static/cropper/cropper.min.js /static/cropper/cropper.min.css 2、 /static/plugin/jscrop/css/cropper.css /static/plugin/jscrop/cropper.js /static/pl 阅读全文

posted @ 2023-07-26 16:18 andydaopeng 阅读(28) 评论(0) 推荐(0)

2023年7月13日

layui相关问题

摘要: layui table横向滚动条不显示问题: 博主使用的是layuimini模板,显示出数据后发现滚动条消失了,在谷歌、IE浏览器都看不到,在火狐浏览器上倒是能正常显示出来,若没有水平滚动条,是不利于展示数据种类多的数据。搞了好久,最后发现竟然是layuimini模板css样式把它给禁用了。注释掉即 阅读全文

posted @ 2023-07-13 16:19 andydaopeng 阅读(234) 评论(0) 推荐(0)

2023年7月10日

各种瓜果、蔬菜种植

摘要: 种类 催芽方法 打芽、整枝 时间 成熟 甜瓜 种子用40度左右温水浸泡4-6小时至自然冷去,捞出沥干,用干净湿巾包好,置于25-30度处进行催芽,种子发芽期间每12小时用清水冲洗一次,以防腐烂。露白后即可播种备注:(我自己用温水跑了6个小时,然后直接种植) 甜瓜秧在长到三片真叶时,就要掐头, 然后它 阅读全文

posted @ 2023-07-10 17:22 andydaopeng 阅读(70) 评论(0) 推荐(0)

2023年6月30日

laravel8配置全局公共函数步骤详解

摘要: 1.首先添加文件,app/Helpers.php ,我这里是这个名字因为习惯了,你也可以自己定义 <?php if( !function_exists("getFileName") ){ /** * 从路径中获取文件名 * @param $fileName * @return string */ f 阅读全文

posted @ 2023-06-30 18:15 andydaopeng 阅读(414) 评论(0) 推荐(0)

2023年5月23日

使用Navicat将SQL server数据库导成mysql数据库

摘要: 一、第一种转换方法 1、使用Navicat Premium打开MySql数据库,然后新建一个数据库名(该数据库名称为需要从SqlServer数据库导过来的名称) 比如需要将SqlServer数据库中的“BJ_DeviceGovern”数据库导入到MySQL数据库中,则需要现在打开的MySQL中创建一 阅读全文

posted @ 2023-05-23 12:08 andydaopeng 阅读(1286) 评论(0) 推荐(0)

2023年5月15日

laravel The requested URL was not found on this server

摘要: 输入index.php是无异常的,但是进入自己定义的route时,如果地址栏中不包含index.php就( 注意是apache 服务器时) 需要排查两个地方: 1.apache 的rewrite_module 是否已经打开 LoadModule rewrite_module modules/mod_ 阅读全文

posted @ 2023-05-15 10:31 andydaopeng 阅读(386) 评论(0) 推荐(0)

2023年4月23日

ffmpeg测试

摘要: //视频截图测试// $outPath = rtrim($relativeFilePath, '.mp4');// $outPath = $outPath . '_a.jpg';// $shell = "ffmpeg -i " . $filePath . " -ss 1 -y -frames:v 1 阅读全文

posted @ 2023-04-23 16:19 andydaopeng 阅读(46) 评论(0) 推荐(0)

2023年4月21日

phpStorm自定义快捷键,输出代码块,模板

摘要: 在开发过程中经常需要打印数据调试,var_dump()或print_r都没办法直观的查看数据,我一般用如下代码打印数据,但是每次手动输入又麻烦,所以设置一个快捷键就能输出一下代码,岂不是一劳永逸 : 1.进入设置对话框: File->Setting 2.接下自定义快捷键:按一下步骤操作完,点击"ok 阅读全文

posted @ 2023-04-21 13:52 andydaopeng 阅读(164) 评论(0) 推荐(0)

2022年8月25日

sentry 日志监控

摘要: https://docs.sentry.io/platforms/php/ Apollo配置中心,开源配置中心之Apollo xxl-job定时任务 zookeeper:作用:配置管理、名字服务、分布式锁、集群管理 etcd api开源网关:apisix kong 阅读全文

posted @ 2022-08-25 14:08 andydaopeng 阅读(84) 评论(0) 推荐(0)

导航

< 2025年7月 >
29 30 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 1 2
3 4 5 6 7 8 9
点击右上角即可分享
微信分享提示