Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jul 2006
    Location
    England
    Posts
    610
    Tokens
    0

    Default Code for including a page?

    Say I wanted to include some php on a html page and I have the php code on a different page how do I add like an include to that page using html?

    Such as <include="blah.php">

    Please help, plus rep


  2. #2
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    php only works on php pages... so pages like "test.php" not "test.html"

  3. #3
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default

    <?php include("PAGENAME.php"); ?>
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  4. #4
    Join Date
    Jul 2006
    Location
    England
    Posts
    610
    Tokens
    0

    Default

    is there a HTML version of that code at all?


  5. #5
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    try this:

    <!--#include FILE="b.inc" -->

  6. #6
    Join Date
    Jul 2006
    Location
    England
    Posts
    610
    Tokens
    0

    Default

    Quote Originally Posted by Blinger View Post
    try this:

    <!--#include FILE="b.inc" -->
    That works thanks!
    I needed it to make my website load faster and that works!
    Rep given out soon, thanks for helping people.


  7. #7
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    no problem, i advise to use google next time

  8. #8
    Join Date
    Jul 2006
    Location
    England
    Posts
    610
    Tokens
    0

    Default

    I did, but I didn't really know what I was looking for so I couldn't find it. SO I thought here was the next best thing to help me


  9. #9
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:


  10. #10
    ScottDiamond Guest

    Default

    You could do an iFrame:

    HTML Code:
    <iframe name="iframe" src="page.html" width="WIDTH HERE" height="HEIGHT HERE" frameborder="0" scrolling="yes">Text here for browsers that can't see iFrames.</iframe>
    Or you can use PHP and put:

    Code:
    <?php
      include("page.php")
    ?>
    Or, as said above:

    Code:
    <!--#include FILE="b.inc" -->
    Last edited by ScottDiamond; 15-12-2006 at 05:09 PM.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •