小编Kar*_*arl的帖子

在Mailchimp广告系列中使用Font Awesome图标

我为mailchimp广告系列创建了一个HTML模板,其中包含页脚中的字体真棒图标.如果我使用Mandrill发送HTML电子邮件,它的工作正常.当我将HTML导入Mailchimp模板时,图标不会出现.

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width" />
    <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
    <style>
.footer i {
        color: #999;
        margin: 0 2px;
    }

    .footer i:hover {
        color: #333;
    }

    .footer p {
        text-align: center;
        margin-bottom: 15px;
    }

    .footer a i {
        border: none;
        outline: none;
    }
</style>
Run Code Online (Sandbox Code Playgroud)

以下是正在使用的图标:

<p>
  <a href="http://facebook.com/"><i class="fa fa-facebook-square fa-2x"></i>
  <a href="http://twitter.com/"><i class="fa fa-twitter fa-2x"></i>
  <a href="http://pinterest.com/"><i class="fa fa-pinterest fa-2x"></i>
  <a href="http://instagram.com/"><i class="fa fa-instagram fa-2x"></i>
</p>
Run Code Online (Sandbox Code Playgroud)

html css font-face mailchimp font-awesome

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

试图在PHP中替换高度和宽度值

尝试用PHP替换字符串($ content)中的height =""和width =""值,我试过preg替换无效,并建议我做错了什么?

示例内容如下:

$content = '<iframe width="560" height="315" src="http://www.youtube.com/embed/c0sL6_DNAy0" frameborder="0" allowfullscreen></iframe>';
Run Code Online (Sandbox Code Playgroud)

代码如下:

if($type === 'video'){

        $s = $content;
        preg_match_all('~(?|"([^"]+)"|(\S+))~', $s, $matches);

        foreach($matches[1] as $match){

            $newVal = $this->_parseIt($match);
    preg_replace($match, $newVal, $s);

        }

    }
Run Code Online (Sandbox Code Playgroud)

在这里,我只需要比赛并搜索我的身高和宽度

function _parseIt($match)
{
    $height = "height";
    $width = "width";

    if(substr($match, 0, 5) === $height){

        $pieces = explode("=", $match);
        $pieces[1] = "\"175\"";

        $new = implode("=", $pieces);
        return $new;

    } 

    if(substr($match, 0, 5) === $width){

        $pieces = explode("=", $match);
        $pieces[1] = "\"285\"";

        $new = implode("=", $pieces);
        return …
Run Code Online (Sandbox Code Playgroud)

php regex preg-replace

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

在节点js中测试catchAll电子邮件的域

我正在尝试以编程方式测试域是否捕获了托管在其上的所有电子邮件地址.我想知道一个特定的域名 - 即.facebook.com - 将收到发送至blahblah@facebook.com的电子邮件.

我目前正在使用节点DNS查看域是否首先有Mx记录,然后我发送ping到电子邮件,不幸的是这非常慢,我想知道是否有更快的方法来检测这一点.

validateDomain: function(domain, array, i, callback) {
    var testEmail = '1qaz2wsx3edc4rfv5tgb@' + domain;
    checkEmail(testEmail, function(validation, addresses, err) {
        if (validation) {
            callback( err, false, array, i);
        } else {
            array.push(domain);
            callback( null, true, array, i);
        }
    });
}
Run Code Online (Sandbox Code Playgroud)

这就是我目前通过使用非常不可能的电子邮件来验证收集的方式.该函数checkEmail使用Mx记录来查看域是否有电子邮件并发送ping.这是我想要替换以检测所有捕获的函数.

谢谢,

email dns sendmail telnet node.js

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

标签 统计

css ×1

dns ×1

email ×1

font-awesome ×1

font-face ×1

html ×1

mailchimp ×1

node.js ×1

php ×1

preg-replace ×1

regex ×1

sendmail ×1

telnet ×1