咱就是一新手,现在又一个PHP的主页,还有一个HTM的网页,我想把HTM合并到PHP中,不知道怎么才能实现!  麻烦各位大仙指导一下,纯属新人

解决方案 »

  1.   

    具体要看i你的结构是怎么样的,如果仅仅是一些内容要包含到php内可以直接 include 这个html文件,注意得将这个html文件原来的 <html><head><body>之类的重复标签给去掉.
      

  2.   

    或者在主页里嵌入一个iframe标签
      

  3.   

    上面的两位大哥我是要将两个网页合并到一个网页,HTM网页显示在上面  PHP显示在下面。
      

  4.   

    php页面中 include 'html页面名';
      

  5.   


    那就直接复制代码粘贴得了 用<?php ?>分界嘛...
      

  6.   

    把html页面的扩展名一改成php就是个php页面,然后加上一些php的相关处理,输出。 合并?
      

  7.   

    <?php
    while(1){
    ?><div>1</div><?php
    }
    ?>你看可以不
      

  8.   

    需要在那显示,就插到哪啊,就像内嵌式的css一样。
      

  9.   

    晕,你理解错了。如:<?php
    /* Created on [2011-12-2] Author[yushuai.niu] */
    require(dirname(__FILE__)."/../classes/action/mail_action_class.php");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?=$webpost['config']['charset']?>" />
    <title><?=$webpost['config']['title']?></title>
    <link type="text/css" rel="stylesheet" href="<?=$webpost['path']['css']?><?=$webpost['css']['style']?>" />
    <script type="text/javascript" language="javascript" src="<?=$webpost['path']['js']?><?=$webpost['js']['jquery']?>"></script>
    <script type="text/javascript" language="javascript" src="<?=$webpost['path']['js']?><?=$webpost['js']['mail']?>"></script>
    <script type="text/javascript" language="javascript" src="<?=$webpost['path']['js']?><?=$webpost['js']['mail_jq']?>"></script>
    <script type="text/javascript" language="javascript" src="<?=$webpost['path']['js']?><?=$webpost['js']['mail_ajax']?>"></script>
    </head><body onload="autoIframHeight()">
    <!-- ============= box:start ============= -->
    <div id="box" class="box">代码或者路径,是根据你的需求添加的,哪里需要具体的数据,哪里就echo;哪里需要另一个页面的内容,就include or require。
      

  10.   


    代码如下,我现在需要把index.asp插入到下面这个主页的上面并居中,我应该如何编写代码?
    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     *//**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);/** Loads the WordPress Environment and Template */require('./wp-blog-header.php');
    ?>