![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hyperf
上海菜鸡毛
珍惜当下
展开
-
hyperf 静态资源访问Not Found
问题hyperf配置了将public替换为上传目录,但生产的excel访问还是Not Found解决在nginx加配置,注意缓存时间为0,不然会有缓存location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|woff2)$ { expires 30d; error_log off; access_log /dev/null; } location ~ .*\.(xlsx)$ {原创 2020-08-07 10:06:03 · 2324 阅读 · 1 评论 -
hyperf Argument 2 passed to Hyperf\Translation\FileLoader::__construct() must be of the type string,
执行如下代码发布translation.php文件1.参考2.参考php bin/hyperf.php vendor:publish hyperf/translation原创 2020-08-06 18:46:01 · 1167 阅读 · 0 评论 -
PHPMailer邮箱发送配置匿名邮箱
亲测php5.6,php7.2都可以.Githubphp5.6 include文件后,也需要use文件,php7.2直接composer安装use PHPMailer\PHPMailer\PHPMailer;use PHPMailer\PHPMailer\Exception;include(__DIR__ . '/PHPMailer-master/src/PHPMailer.php');include(__DIR__ . '/PHPMailer-master/src/Exception.ph原创 2020-07-31 20:04:12 · 514 阅读 · 0 评论 -
hyperf跨域 配置nginx
1.参考2.nginx配置# 至少需要一个 Hyperf 节点,多个配置多行upstream a2admin { # Hyperf HTTP Server 的 IP 及 端口 server 127.0.0.1:9611;}server{ listen 80; server_name xxxxx; .......... location /{ if ($request_method = 'OPTIONS') {原创 2020-07-30 14:42:49 · 2114 阅读 · 0 评论 -
hyperf 常见错误
504 Gateway Time-out 参考1.nginx.conf下加如下内容http { ...... #用于tomcat反向代理,解决nginx 504错误 proxy_connect_timeout 300; #单位秒 proxy_send_timeout 300; #单位秒 proxy_read_timeout 300; #单位秒 proxy_buffer_size 16k; proxy_buffers 4 64k;原创 2020-07-28 15:22:41 · 2249 阅读 · 0 评论 -
laravel laravel-s hyperf 压测
并发参考测下来hyperf表现最好原创 2020-06-29 11:48:03 · 1533 阅读 · 0 评论 -
hyperf ffmpeg 合成序列帧性能测试
环境配置用户图片合成、合成文字使用hyperf的队列软件版本centoscentos7.6 8核16Gffmpeg4.1hyperf2.0单用户2个进程,每秒26帧(26张图片)序列帧26张渐变图耗时(4段视频,合计48序列帧)合成用户图片耗时合成文字耗时合成视频耗时合计CPU消耗视频长度158序列帧(4*4)16秒3.2秒3.2秒1秒23秒45%6秒316序列帧(4*4)16秒13秒13秒原创 2020-07-10 13:43:09 · 809 阅读 · 0 评论 -
hyperf 常用方法函数/注意事项
文件上传// request继承AbstractController得到$request = $this->request;$file = $request->file('file');$file =$request->file($key);// $path目录必须存在$path = 'public/aliyun/'.time().mt_rand(1,10000).'.'.$file->getExtension();$file->moveTo($path);日原创 2020-06-23 13:28:50 · 2348 阅读 · 0 评论