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;