PHP学会网 php培训网 PHP暑期培训 PHP寒假培训 PHP假期培训 » PHP中高级 » htm页面切入php代码
本页主题: htm页面切入php代码 打印 | 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题

自由的龙

该用户目前不在线
级别: 中级程序员
精华: 1
发帖: 1264
威望: 1267 点
金钱: 12660 PYMB
贡献值: 0 点
在线时间:0(小时)
注册时间:2006-04-16
最后登录:2006-06-27

htm页面切入php代码


<html>
<head>
<title>test1</title>
</head>
<body>
<table>
<?php
for ($i = 0; $i < 10; $i++)
{
  echo "<tr><td>Line $i</td></tr>";
}
?>
</table>
</body>
</html>



CODE:[Copy to clipboard]<?php
$content = "This is the content";
print <<<EOT
<html>
<head>
<title>test 2</title>
</head>
<body>
<div>$content</div>
</body>
</html>
EOT:
?>



CODE:[Copy to clipboard]<?php
$content = "This is the content";
?>
<html>
<head>
<title>test 3</title>
</head>
<body>
<div><?=$content?></div>
</body>
</html>
顶端 Posted: 2006-04-20 17:49 | [楼 主]
PHP学会网 php培训网 PHP暑期培训 PHP寒假培训 PHP假期培训 » PHP中高级

时:01-09 22:15 Copyright © 2006 phpwhy.com 权
ICP05060669

曳息 -