喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 喜悦证交所 | 帮助

RSS 订阅当前论坛  

[北京]代朋友公司招聘PHP高级程序员多名

上一主题 下一主题
     
标题: 想破了头,都没有想明白!!  
 
lovphp
注册会员
Rank: 2


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程序可以正常运行,想不明白...希望能指教下!!!
2006-8-5 11:23 PM#1
查看资料  发短消息  顶部
 
aninfeel
注册会员
Rank: 2



UID 72153
精华 0
积分 99
帖子 154
金钱 99 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-4-22
来自 广东惠州
状态 离线
[推荐阅读] 安装linux的时候选择组件,把apache mysql php也安了,但是mysql要如何设置啊
include的正确翻译不叫“包含”,应该叫“吞”或者“吃”,被“吃”掉了就成了被人到一部分了——应该明白了吧?
2006-8-5 11:43 PM#2
查看资料  发短消息  QQ  顶部
 
lovphp
注册会员
Rank: 2


UID 76670
精华 0
积分 138
帖子 96
金钱 138 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-7-18
状态 离线
[推荐阅读] 喜悦历史照片
谢谢!!呵呵
2006-8-6 12:24 AM#3
查看资料  发短消息  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.021796 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP