How to include file from different server

Discussion in 'PHP' started by deva.vvel, Jul 11, 2007.

  1. #1
    Hi,

    I have a file named test1.php in server 1,
    and another file named test2.php in server 2, I wish to include test1.php in the file test2.php. Can anyone help?

    deva
     
    deva.vvel, Jul 11, 2007 IP
  2. Greg Carnegie

    Greg Carnegie Peon

    Messages:
    385
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can only include it as .html file.

    If it was possible to include it as PHP file then anyone could your website.
     
    Greg Carnegie, Jul 11, 2007 IP
  3. uglyboy

    uglyboy Peon

    Messages:
    1,963
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <?php
    require($DOCUMENT_ROOT . "path to file/include-file.html");
    ?>
    PHP:
     
    uglyboy, Jul 12, 2007 IP
    deva.vvel likes this.
  4. deva.vvel

    deva.vvel Guest

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks uglyboy.. thats what i looked for..
     
    deva.vvel, Jul 12, 2007 IP