小编Fok*_*ule的帖子

发送邮件到mailtrap.io

我正在使用Laravel 5.1,并在应用程序中创建了联系页面。因此用户可以发送电子邮件。在这里,我使用了mailtrap.io。创建后可以使用。我的意思是将邮件发送到mailtrap.io没有问题

但是今天,当我再次检查时,它向我显示了此错误。

StreamBuffer.php第268行中的Swift_TransportException:无法与主机mailtrap.io建立连接[连接尝试失败,因为一段时间后连接方未正确响应,或者由于连接的主机未能响应而建立连接失败。#10060]

我已经用mailtrap.io设置检查了.env文件。一切都好。这是我的.env文件设置

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=25
MAIL_USERNAME=[username]
MAIL_PASSWORD=[password]
MAIL_ENCRYPTION=tls
Run Code Online (Sandbox Code Playgroud)

有人帮我吗

email laravel-5

3
推荐指数
1
解决办法
4313
查看次数

如何直接从url上传文件到S3存储桶

我收到了一些来自用户的彩信。这些彩信是通过 twilio 发送的。因此 twilio 将这些文件存储到他们的服务器中,我可以从 twilio 访问这些文件。但就我而言,我需要将这些文件存储到 S3 中并从 S3 显示到我们的系统中。我可以将这些文件存储到我的本地文件夹或我的服务器中。但我没有找到任何方法直接从 url 将文件存储到 S3 中。这就是我从 url 存储到本地目录中所做的事情。

// url of my file. Mostly it will be image.
$url = 'urlofmyfile';
// Path where I am saving. Keeping for jpg for now
$img = 'file/sms/file.jpg';
// saving the file into the folder
file_put_contents($img, file_get_contents($url));
Run Code Online (Sandbox Code Playgroud)

如果有人想将文件直接上传到我的系统中,这就是我将文件保存到 S3 中的方法。例如,如果任何用户想要上传他们的个人资料图片。

public function saveToS3Bucket($uploadFileName, $imageTmpName) {
    $s3Client = new \Aws\S3\S3Client([
        'version' => env('S3_BUCKET_VERSION'),
        'region'  => env('S3_BUCKET_REGION'),
        'credentials' => array(
            'key'    => env('S3_BUCKET_KEY'),
            'secret' => env('S3_BUCKET_SECRET'), …
Run Code Online (Sandbox Code Playgroud)

php cakephp amazon-s3 twilio

2
推荐指数
1
解决办法
3916
查看次数

CSS悬停转换无法正常工作

我有一个div.我想在悬停效果上对这个div进行边框处理.而这个边界应该具有过渡效应.它工作正常.但我的问题是当我从div移动鼠标时此时边框直接进入而没有任何过渡效果.这是我的div

.pending:hover{
     -webkit-transition: border .35s ease-in-out;
     transition: border .35s ease-in-out;
     border: 2px solid red;
}
Run Code Online (Sandbox Code Playgroud)
<div class="pending">
   <h2>this is title </h2>
   <button>Menu</button>
   <button>Menu</button>
   <button>Menu</button>
</div>
Run Code Online (Sandbox Code Playgroud)

html css

0
推荐指数
1
解决办法
51
查看次数

显示:flex 不工作

我创建了一个 divdisplay:flexflex-direction: column-reverse;。它在 Chrome 上运行良好,但在 Firefoxdisplay:flex中不起作用。

#team-messageid 
{
   height: 350px;
   overflow: auto;
   display: flex;
   flex-direction: column-reverse;
}
Run Code Online (Sandbox Code Playgroud)
<div id="team-messageid">
    <div id="single-message;" style="background-color: #E8E8E8;border-radius:15px;margin-right: 24px;margin-left:24px;margin-bottom:1%;border-top-right-radius:0px;">
        <div><span class="single-message" style="font-size:19px;float:right;padding: 1%;">Div 1</span><br></div>
    </div>
    <div id="single-message;" style="background-color: #E8E8E8;border-radius:15px;margin-right: 24px;margin-left:24px;margin-bottom:1%;border-top-right-radius:0px;">
        <div><span class="single-message" style="font-size:19px;float:right;padding: 1%;">Div 2</span><br></div>
    </div>
    <div id="single-message;" style="background-color: #E8E8E8;border-radius:15px;margin-right: 24px;margin-left:24px;margin-bottom:1%;border-top-right-radius:0px;">
        <div><span class="single-message" style="font-size:19px;float:right;padding: 1%;">Div 3</span><br></div>
    </div>
    <div id="single-message;" style="background-color: #E8E8E8;border-radius:15px;margin-right: 24px;margin-left:24px;margin-bottom:1%;border-top-right-radius:0px;">
        <div><span class="single-message" style="font-size:19px;float:right;padding: 1%;">Div 4</span><br></div>
    </div>
    <div id="single-message;" style="background-color: #E8E8E8;border-radius:15px;margin-right: 24px;margin-left:24px;margin-bottom:1%;border-top-right-radius:0px;">
        <div><span class="single-message" style="font-size:19px;float:right;padding: 1%;">Div 5</span><br></div>
    </div> …
Run Code Online (Sandbox Code Playgroud)

css firefox flexbox

0
推荐指数
1
解决办法
7811
查看次数

标签 统计

css ×2

amazon-s3 ×1

cakephp ×1

email ×1

firefox ×1

flexbox ×1

html ×1

laravel-5 ×1

php ×1

twilio ×1