1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP if becomes partially equal to?

Discussion in 'PHP' started by scottlpool2003, Aug 23, 2012.

  1. #1
    EDIT
    I changed it to..

    But it is still processing between the {} tags regardless of what directory it is. I changed it to 43523 and it still outputs information.... Any ideas?
    ========================================================



    I think I'm probably going about this the wrong way but basically, I'm making a template system for a series of websites that will sit in directories on the domain e.g.

    domain.com/site1/
    domain.com/site2/

    I'm only using includes to include template files and using the URL to relate the files:

    // Get url
    $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    
    // Relate url to website
    if ($url = "http://www.domain.com/site1/index.php"){
    $siteid = "4";
    $sitename = "Foo";
    $logo = "logo.png";
    }
    PHP:
    I got this far and everything works perfectly, it pulls from the db etc on the homepage but I just realised that as soon as I add another page, it won't work.

    Is there a way to get the directory from the URL and relate the siteid to the /site1/ directory?
     
    Last edited: Aug 23, 2012
    scottlpool2003, Aug 23, 2012 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    danx10, Aug 23, 2012 IP