lovphp
注册会员

UID 76670
精华
0
积分 138
帖子 96
金钱 138 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-7-18
状态 离线
|
想破了头,都没有想明白!!
<?php
require_once("head.php");
include($_url."index".$html);
require_once("foot.php");
?>
上面是index.php的内容 $_url 是存放模板的路径,$html定义的文件后缀名
下面是index.html的内容
<?php
$sql="select * from $gonggao where Type='网站公告' order by Id desc";
$query=mysql_query($sql);
$arr=mysql_fetch_array($query);
$title=$arr['Title'];
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
<tr>
<td height="25" bgcolor="#d34c2a" class="title">网站公告</td>
</tr>
<tr>
<td height="130" align="left" valign="top" bgcolor="f6f6f6"><?php echo $title;?></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"> </td>
</tr>
</table>
我就不明白这个静态文件里面的php程序可以正常运行,想不明白...希望能指教下!!!
|
|