Results 1 to 3 of 3

Thread: PHP include randomly not working

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default PHP include randomly not working

    Okay, i use a header, footer, style and index page set up, so every page i make has a PHP include. However, for some stupid reason its not working out of nowhere, I didn't even touch the code at all. it was this:
    Code:
    <?php include("http://www.modernrevolutions.vivid-avenue.net/layout/header2.php"); ?>
    And i just changed it to:
    Code:
    <?php include 'http://www.modernrevolutions.vivid-avenue.net/layout/header2.php'; ?>
    Which is what i found on a site. However, its still not working what so ever. Here is a link to my page:
    http://www.modernrevolutions.vivid-avenue.net
    ------------------
    Check out my site here and let me know what you think

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    I think you need to contact your host

    URL file-access is disabled in the server configuration...
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default

    Just use relative links:
    include "layout/header2.php";
    Be sure your include path is set to your site root!
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •