php heredoc

发布时间:2017-08-11 10:52:10 阅读:921次

http://www.cnblogs.com/mazey/p/6942762.html?utm_source=itdadao&utm_medium=referral

[root@web test.com]# cat 1.php

<?php
$username="siyu";
$mazey=<<<EOF
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <title>小黑记事本</title>
    <script>
        ! function(a, b) {
            var c = a.documentElement,
                d = "orientationchange" in window ? "orientationchange" : "resize",
                e = function() {
                    var a = c.clientWidth;
                    a && (a >= 750 && (a = 750), c.style.fontSize = 100 * (a / 750) + "px")
                };
            a.addEventListener && (b.addEventListener(d, e, !1), e())
        }(document, window);
    </script>
    <style type="text/css">
      .hei_main{
        width: 7.5rem;
        height: auto;
        margin:0 auto;
        font-size: 0.3rem;
      }
    </style>
</head>
<body>
<div class="hei_main">
hello world 你好,世界
</div>
{$username}
</body>
</html>
EOF;
echo $mazey;

如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术

支付宝 微信

有疑问联系站长,请联系QQ:QQ咨询
上一篇:ldap服务器
下一篇:redis抢购

转载请注明:php heredoc 出自老鄢博客 | 欢迎分享