日期:2014-05-17 浏览次数:20467 次
<?php $name = '浅水游'; print <<<EOT <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>Untitled Document</title> </head> <body> <!--12321--> Hello,$name! </body> </html> EOT; ?>
$v=2; $a= <<<EOF "abc"$v "123" EOF; echo $a; //结果连同双引号一起输出:"abc"2 "123"
function outputhtml(){ echo "<html>"; echo "<head><title>主页</title></head>"; echo "<body>主页内容</body>"; echo "</html>; } function outputhtml() { echo <<<EOT <html> <head><title>主页</title></head> <body>主页内容</body> </html> EOT; } outputhtml();