![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php
小枫vip
我的代码愿意为你服务!
展开
-
Laravel DB::transaction 方式如何传参
今天在使用 Laravel 的事务的时候,一直报变量未定义的错误$order_id = 12;DB::transaction(function () { $tmp = $order_id;});Undefined variable: order_id仔细一看,才发现这是个匿名函数匿名函数所以正确的使用方式是$order_id = 12;DB::transaction(function () use ($order_id) { $tmp = $order_id;});参数.原创 2021-04-22 11:21:55 · 912 阅读 · 0 评论 -
Laravel 8 发邮件报错 Swift_TransportException 解决方法
问题分析本地调试开发正常,代码发布到阿里云服务器上线测试出现如下报错exception: "Swift_TransportException"message: "Connection could not be established with host smtp.exmail.qq.com :stream_socket_client(): unable to connect to ssl://smtp.exmail.qq.com:25 (Connection timed out)"file: "/w原创 2021-02-26 14:55:33 · 2057 阅读 · 0 评论 -
TP5 在 lnmp 环境下必要的配置
tp5 默认在 nginx 服务器 是不能正常工作的,需要我们手动配置 nginx 服务器 以便对 tp 5 的支持!打开 Nginx 站点配置文件$ sudo vi /etc/nginx/vhost/vhost_siteA.conf编辑站点配置文件#自定义服务器配置开始server { listen 80; # 监听端口原创 2018-04-04 14:51:36 · 2297 阅读 · 0 评论