36 users online (0 members and 36 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 1
  2. Trade links with multiple sites    Forum: Link Exchange
    Replies: 2
  1. #1
    sooraj's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2011
    Posts
    3

    how i include a table in multiple sites?

    Hello

    I have multiple of websites. I want to include an html table in every footer of those sites. The table code is in a file located on another site.
    All sites are php.

    I want this so that I can modify the table from one file instead of having to modify it mutiple times.

    Is that possible ? And how can I do it ?

    Give any best idea which is helpful for me.


    Thank you.

    Regards

  2. #2
    sooraj's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2011
    Posts
    3

    Re: how i include a table in multiple sites?

    I have put the table code in a file datalinks.inc

    Then I used the following function:

    <?php include("datalinks.inc"); ?>

    in every site's footer.

    when i do that its not work and i did not know what to do.

    what would i do now?

    help me

  3. #3
    firestone's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2011
    Posts
    13

    Re: how i include a table in multiple sites?

    actually i dont understand ur query

  4. #4
    stephen011's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2011
    Location
    Santa Ana,CA, USA
    Posts
    21

    Re: how i include a table in multiple sites?

    Hi please follow below instruction:

    Make the table, copy the html for the table and it's content alone into a plain text file and save it as TheTable.inc (or whatever) put it in a directory on one of your websites like myMainWebSite.com/includes/datalinks.inc or whatever. Then place this code on any web page (as long as it ends with a .php file extension and it is on a server that will run PHP), on any website where you want that table to appear.
    PHP Code:
    <?php
    require_once("myMainWebSite.com/includes/datalinks.inc");
    ?>
    If you do this correctly and it doesn't work there is there is one of two problems in play:
    1-Your server doesn't run PHP
    2-your server allows PHP but doesn't allow "including" files. contact them and they'll give you simple instruction about putting some text in a file and placing it on your server to give yourself permission.


    Thanks