A little PHP help please!

Discussion in 'PHP' started by simon369, Dec 10, 2011.

  1. #1
    Hi,

    I have a network of sites that are all on the same shared hosting account,

    On each site I have a little links section that I want to show the same links and I also want tobe able to update it at the same time.

    So for example I have

    Site1.com
    site2.com
    site3.com

    I want a little section on each site to load a php file that will contain the links.

    I have looked at the include function but couldnt seem to get it to work.

    The sites are on a shared hosting package,

    So site one is at public_html/ on the server and the other sites are public_html/site/ etc

    Thanks
     
    simon369, Dec 10, 2011 IP
  2. Karl-

    Karl- Greenhorn

    Messages:
    46
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #2
    Drop me a PM and I'll give you some advice to help you out.
     
    Karl-, Dec 10, 2011 IP
  3. yho_o

    yho_o Well-Known Member

    Messages:
    354
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    #3
    lets say we got a file for your menu which you'll use in all sites i.e:
    [URL]http://www.yoursite.com/mymenu.php[/URL]
    Code (markup):
    then you'll can use the following code to include your menu in any website and you can only edit it once :

    <?php
          include("http://www.yoursite.com/mymenu.php");
    ?>
    Code (markup):
    this is a very basic example, if you need help let me know by PM, Thank you
     
    yho_o, Dec 11, 2011 IP
  4. prince@life

    prince@life Notable Member

    Messages:
    278
    Likes Received:
    13
    Best Answers:
    3
    Trophy Points:
    225
    #4
    Will help you..
    PM me.
     
    prince@life, Dec 12, 2011 IP
  5. sherlick

    sherlick Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    This is very useful link thanks for sharing.
     
    sherlick, Dec 12, 2011 IP