Include - styles and images do not work

Discussion in 'PHP' started by blueparukia, Feb 10, 2008.

  1. #1
    My code is simple:

    index.php (root directory):
    
    require('themes/default/index.php');
    
    PHP:
    In the HTML of the included file are both img and "link" tags - and they do not show up at all.

    I can get them to show up if I access the file directly - or include the stylesheet/image above the root directory.

    I desperately need help with this.

    Cheers,

    BP
     
    blueparukia, Feb 10, 2008 IP
  2. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is the file not loading at all, or are the paths just wrong? If you include a file in another folder, it will use paths relative to where the main file being load is (not the file you're including).
     
    projectshifter, Feb 11, 2008 IP
    blueparukia likes this.
  3. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #3
    Ahh ok. Thank you very much. All working fine now :)
     
    blueparukia, Feb 11, 2008 IP
  4. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Great to hear =) You've got to start learning somewhere, pretty much just doing it over and over is how you get good at it. Feel free to post if you have anymore issues you can't solve
     
    projectshifter, Feb 11, 2008 IP