How to insert html page into another page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fatfoo
    ICQ:649699063
    • Mar 2003
    • 27763

    #1

    How to insert html page into another page?

    Hello,

    Let's say you have a top.html and you want to insert it into index.html.

    What are some ways to do this?

    I tried these 3 lines of code, but they did not work.

    <!--#include virtual="top.html">

    <?include "top.html"?>

    <?php include("top.html"); ?>

    Thank you,
    Fatfoo
    Send me an email: [email protected]
  • mikke
    Confirmed User
    • Jan 2010
    • 1327

    #2
    rename index.html to index.php and try
    PHP Code:
    <?php include('top.html'); ?>
    ;)
    icq: 395 294 346
    http://www.adultsubmitter.eu - submit any adult site to 20 directories from 1 form!
    now 20 domains!
    http://www.porndeals.eu http://www.ebonybangbros.com

    Comment

    • Stef.
      Confirmed User
      • Feb 2009
      • 995

      #3
      ask a guy with that much gfy posts count and so clueless ?!?!? LOL
      Try RSTGP : A Really Simple FREE Thumb Rotator Script. You Can Build A Complete TGP Site In 20 Minutes...
      contact me if you have questions (example site : Teen Sex Galleries )
      Sexy Cams Online

      Comment

      • fatfoo
        ICQ:649699063
        • Mar 2003
        • 27763

        #4
        Originally posted by mikke
        rename index.html to index.php and try
        PHP Code:
        <?php include('top.html'); ?>
        ;)
        I will try that...
        Send me an email: [email protected]

        Comment

        • DigitalTheory
          ^-^
          • Jul 2007
          • 1055

          #5
          Originally posted by mikke
          rename index.html to index.php and try
          PHP Code:
          <?php include('top.html'); ?>
          ;)

          exactly this, a php include will not work on an html page.

          Comment

          • HomerSimpson
            Too lazy to set a custom title
            • Sep 2005
            • 13826

            #6
            Originally posted by DigitalTheory
            exactly this, a php include will not work on an html page.
            well it could work if you say apache to parse .html files as php ones...
            you should add something like this to your htaccess
            Code:
            AddHandler application/x-httpd-php htm html
            but that depends on server config (ask your hosting provider for this line).

            this way you can use php inside .htm or .html files...

            if you have lot's of .html files try to avoid this.
            you can also do it by mod_rewrite...

            hit me up for specific details
            (icq in sig)
            Make a bank with Chaturbate - the best selling webcam program
            Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

            PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

            Comment

            Working...